Externl Login
This commit is contained in:
parent
cf5bef475d
commit
6c175783a9
12 changed files with 346 additions and 35 deletions
|
|
@ -13,9 +13,7 @@
|
|||
using System.IdentityModel.Tokens.Jwt;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
|
||||
JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
|
||||
|
||||
|
||||
JwtSecurityTokenHandler.DefaultMapInboundClaims = true;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
|
@ -38,13 +36,11 @@ builder.Services
|
|||
options.Scope.Add("profile");
|
||||
options.Scope.Add("scope2");
|
||||
options.MapInboundClaims = true;
|
||||
options.ClaimActions.MapUniqueJsonKey("preferred_username","preferred_username");
|
||||
options.ClaimActions.MapUniqueJsonKey("preferred_username", "preferred_username");
|
||||
options.ClaimActions.MapUniqueJsonKey("gender", "gender");
|
||||
|
||||
options.SaveTokens = true;
|
||||
});
|
||||
|
||||
|
||||
using (var app = builder.Build())
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue