Using two-factor authentication in ASP.NET MVC / Identity, I have successfully configured UserManager.SmsService.
By default, ASP.NET Identity generates a six-digit long validation token that is sent via SMS. However, our requirement is that instead of an alphanumeric token of 4 characters.
Code is generated using this command:
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(User.Identity.GetUserId(), phoneNumber);
Is there a way to determine the format of the generated code?
source
share