Skip to content

Commit a1dc9e5

Browse files
author
Leonid
committed
Fix localization
1 parent 791d3ce commit a1dc9e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

eFormAPI/eFormAPI/Infrastructure/Identity/Providers/ApplicationOAuthProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwner
7777
var oAuthIdentity = await user.GenerateUserIdentityAsync(userManager,
7878
OAuthDefaults.AuthenticationType);
7979

80+
var cookiesIdentity = await user.GenerateUserIdentityAsync(userManager,
81+
CookieAuthenticationDefaults.AuthenticationType);
82+
8083
// Add custom claims
8184
if (!user.Locale.IsNullOrEmpty())
8285
{
8386
oAuthIdentity.AddClaim(new Claim("locale", user.Locale));
87+
cookiesIdentity.AddClaim(new Claim("locale", user.Locale));
8488
}
85-
86-
87-
var cookiesIdentity = await user.GenerateUserIdentityAsync(userManager,
88-
CookieAuthenticationDefaults.AuthenticationType);
8989

9090
var properties = CreateProperties(user, role);
9191
var ticket = new AuthenticationTicket(oAuthIdentity, properties);

0 commit comments

Comments
 (0)