Compare commits
7
Commits
1.85.0
..
f001b02633
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f001b02633 | ||
|
|
90a11dc65e | ||
|
|
de955a96a8 | ||
|
|
cdf5cfb5cd | ||
|
|
c4d3bb4cdf | ||
|
|
65f102f18a | ||
|
|
cdc80db214 |
@@ -42,24 +42,13 @@ public static class Api
|
|||||||
options.Scope.Add("profile");
|
options.Scope.Add("profile");
|
||||||
options.Scope.Add("email");
|
options.Scope.Add("email");
|
||||||
|
|
||||||
options.Events = new OpenIdConnectEvents
|
options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;
|
||||||
{
|
options.CorrelationCookie.SameSite = SameSiteMode.None;
|
||||||
OnRedirectToIdentityProvider = context =>
|
options.CorrelationCookie.HttpOnly = true;
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(context.ProtocolMessage.RedirectUri) && context.ProtocolMessage.RedirectUri.StartsWith("http://", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
var uriBuilder = new UriBuilder(context.ProtocolMessage.RedirectUri)
|
|
||||||
{
|
|
||||||
Scheme = "https",
|
|
||||||
Port = -1,
|
|
||||||
};
|
|
||||||
|
|
||||||
context.ProtocolMessage.RedirectUri = uriBuilder.Uri.ToString();
|
options.NonceCookie.SecurePolicy = CookieSecurePolicy.Always;
|
||||||
}
|
options.NonceCookie.SameSite = SameSiteMode.None;
|
||||||
|
options.NonceCookie.HttpOnly = true;
|
||||||
return Task.CompletedTask;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
|
|||||||
Reference in New Issue
Block a user