Skip to content

Commit

Permalink
Merge pull request #11288 from umbraco/v9/bugfix_for_2fa_user_auth
Browse files Browse the repository at this point in the history
Fixed bug where the wrong schema was signed in when using 2fa.
  • Loading branch information
nikolajlauridsen authored Oct 6, 2021
2 parents ca80ecf + 9b64219 commit d311cc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Umbraco.Web.Common/Security/UmbracoSignInManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ protected override async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, b
{
// Store the userId for use after two factor check
var userId = await UserManager.GetUserIdAsync(user);
await Context.SignInAsync(IdentityConstants.TwoFactorUserIdScheme, StoreTwoFactorInfo(userId, loginProvider));
await Context.SignInAsync(TwoFactorAuthenticationType, StoreTwoFactorInfo(userId, loginProvider));
return SignInResult.TwoFactorRequired;
}
}
Expand All @@ -372,7 +372,7 @@ protected override async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, b
await Context.SignOutAsync(ExternalAuthenticationType);
}
if (loginProvider == null)
{
{
await SignInWithClaimsAsync(user, isPersistent, new Claim[] { new Claim("amr", "pwd") });
}
else
Expand Down

0 comments on commit d311cc3

Please sign in to comment.