Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c194c1141 | |||
| b41136e2c7 | |||
| 41eb4daeb4 | |||
| c423f04b42 | |||
| 7fe5f7aef3 | |||
| a567fc7cd7 | |||
| 31254932ae | |||
| c53434a578 |
@@ -31,9 +31,8 @@ public static class Api
|
|||||||
|
|
||||||
options.ClientId = authOptions.ClientId;
|
options.ClientId = authOptions.ClientId;
|
||||||
options.ClientSecret = authOptions.ClientSecret;
|
options.ClientSecret = authOptions.ClientSecret;
|
||||||
options.SignedOutCallbackPath = "/signout-callback-oidc";
|
|
||||||
|
|
||||||
options.ResponseType = "code";
|
options.ResponseType = "code";
|
||||||
|
|
||||||
options.SaveTokens = true;
|
options.SaveTokens = true;
|
||||||
options.GetClaimsFromUserInfoEndpoint = true;
|
options.GetClaimsFromUserInfoEndpoint = true;
|
||||||
|
|
||||||
@@ -41,16 +40,10 @@ public static class Api
|
|||||||
options.Scope.Add("openid");
|
options.Scope.Add("openid");
|
||||||
options.Scope.Add("profile");
|
options.Scope.Add("profile");
|
||||||
options.Scope.Add("email");
|
options.Scope.Add("email");
|
||||||
|
|
||||||
options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;
|
|
||||||
options.CorrelationCookie.SameSite = SameSiteMode.None;
|
|
||||||
options.CorrelationCookie.HttpOnly = true;
|
|
||||||
|
|
||||||
options.NonceCookie.SecurePolicy = CookieSecurePolicy.Always;
|
|
||||||
options.NonceCookie.SameSite = SameSiteMode.None;
|
|
||||||
options.NonceCookie.HttpOnly = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
services.AddCascadingAuthenticationState();
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +64,7 @@ public static class Api
|
|||||||
options.TokenValidationParameters = new TokenValidationParameters
|
options.TokenValidationParameters = new TokenValidationParameters
|
||||||
{
|
{
|
||||||
ValidIssuer = authOptions.Authority,
|
ValidIssuer = authOptions.Authority,
|
||||||
ValidateAudience = false,
|
ValidateAudience = true,
|
||||||
ValidateIssuer = true,
|
ValidateIssuer = true,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -87,7 +80,7 @@ public static class Api
|
|||||||
{
|
{
|
||||||
await context.ChallengeAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
await context.ChallengeAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
||||||
{
|
{
|
||||||
RedirectUri = redirectUri,
|
RedirectUri = redirectUri,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -99,7 +92,7 @@ public static class Api
|
|||||||
|
|
||||||
await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
await context.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
||||||
{
|
{
|
||||||
RedirectUri = currentBaseUrl
|
RedirectUri = currentBaseUrl,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user