Skip to content

Commit d311cc3

Browse files
Merge pull request #11288 from umbraco/v9/bugfix_for_2fa_user_auth
Fixed bug where the wrong schema was signed in when using 2fa.
2 parents ca80ecf + 9b64219 commit d311cc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Umbraco.Web.Common/Security/UmbracoSignInManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ protected override async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, b
362362
{
363363
// Store the userId for use after two factor check
364364
var userId = await UserManager.GetUserIdAsync(user);
365-
await Context.SignInAsync(IdentityConstants.TwoFactorUserIdScheme, StoreTwoFactorInfo(userId, loginProvider));
365+
await Context.SignInAsync(TwoFactorAuthenticationType, StoreTwoFactorInfo(userId, loginProvider));
366366
return SignInResult.TwoFactorRequired;
367367
}
368368
}
@@ -372,7 +372,7 @@ protected override async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, b
372372
await Context.SignOutAsync(ExternalAuthenticationType);
373373
}
374374
if (loginProvider == null)
375-
{
375+
{
376376
await SignInWithClaimsAsync(user, isPersistent, new Claim[] { new Claim("amr", "pwd") });
377377
}
378378
else

0 commit comments

Comments
 (0)