fix: oauth
This commit is contained in:
@@ -16,7 +16,7 @@ builder.Services.AddAuthentication(options =>
|
||||
{
|
||||
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
|
||||
|
||||
options.CallbackPath = "/signin-oidc";
|
||||
|
||||
options.Authority = "https://oauth.e1lama.ru/application/o/asp_net";
|
||||
options.ClientId = "";
|
||||
@@ -29,7 +29,7 @@ builder.Services.AddAuthentication(options =>
|
||||
options.Scope.Add("profile");
|
||||
options.Scope.Add("email");
|
||||
|
||||
options.GetClaimsFromUserInfoEndpoint = true;
|
||||
options.GetClaimsFromUserInfoEndpoint = false;
|
||||
|
||||
options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
|
||||
{
|
||||
@@ -73,7 +73,7 @@ var summaries = new[]
|
||||
|
||||
app.MapGet("/me", (HttpContext ctx) =>
|
||||
{
|
||||
return ctx.User.Claims.Select(x => (x.Type, x.Value));
|
||||
return ctx.User.Claims.Select(x => $"{x.Type} {x.Value}");
|
||||
})
|
||||
.RequireAuthorization()
|
||||
.WithOpenApi();
|
||||
|
||||
Reference in New Issue
Block a user