Hi Team,
I can see that ASP.NET Zero supports Two Factor Authentication, and I can see how to enable those using the Angular application.We wanted to implement Two Factor Authentication on our own mobile app using React native. Given I have enabled two factor authentication using the tenant adminstration page. Can you please describe the flow that needs to be implemented?
Thanks
1 Answer(s)
-
0
Hi @andry3ag,
Your Authenticate request returns something like this when two factor is enabled;
RequiresTwoFactorVerification = true, UserId = "{USERID}", TwoFactorAuthProviders = "{LIST_OF_PROVIDERS}", ReturnUrl = "{RETURN_URL}"
When you receive such a result, you should allow user to select one of the providers returned in
TwoFactorAuthProviders
. When user selects one of them, you need to make a request toTokenAuth/SendTwoFactorAuthCode
. In the next screen, there must be a code for entering two factor code. When user enters the two factor code, you need to make a request toAuthanticate
method again withTwoFactorVerificationCode
. After all, you should receive a valid token and user logins to the system.