Allow QR AuthenticatorIssuer to be configurable

This commit is contained in:
Hao Kung 2018-08-17 12:56:49 -07:00
parent 797ea9d8f5
commit d040dabc03
2 changed files with 6 additions and 1 deletions

View File

@ -75,5 +75,10 @@ namespace Microsoft.AspNetCore.Identity
/// The <see cref="AuthenticatorTokenProvider"/> used to validate two factor sign ins with an authenticator.
/// </value>
public string AuthenticatorTokenProvider { get; set; } = DefaultAuthenticatorProvider;
/// <summary>
/// Gets or sets the issuer used for the authenticator issuer.
/// </summary>
public string AuthenticatorIssuer { get; set; } = "Microsoft.AspNetCore.Identity.UI";
}
}

View File

@ -156,7 +156,7 @@ namespace Microsoft.AspNetCore.Identity.UI.Pages.Account.Manage.Internal
{
return string.Format(
AuthenticatorUriFormat,
_urlEncoder.Encode("Microsoft.AspNetCore.Identity.UI"),
_urlEncoder.Encode(_userManager.Options.Tokens.AuthenticatorIssuer),
_urlEncoder.Encode(email),
unformattedKey);
}