Register phone number instead of email using mvc id

I have a requirement in my web application that I need to register a user with their phone number instead of email and password.

The system should enter the user's phone number and send OTP-SMS to this phone number. If OTP matches, I need to create a user.

I tried 2FA with the asp.net ID, but it only works when the user is already registered and the phone number is updated in the user table.

Can anybody help me.

Thanks at Advance.

Tarak

+7
source share
3 answers

-, , .

, - , / , OTP , OTP . , otp, otp, / , otp , . , - . - - - . , .

0

ASP.NET(Core) Identity , , . , ASP.NET Identity SecurityStamp ( ), TOTP. 100%, . 2 :

  • "" (, SecurityStamp) , TOTP ASP.NET Identity. / (, , ).
  • PhoneNumberTokenProvider GenerateAsync TOTP ValidateAsync, . , GenerateAsync ValidateAsync User - SecurityStamp. 1) : SecurityStamp. , SHA (PhoneNumber) SecurityStamp. , TOTP. 2) User.SecurityStamp GenerateAsync, ValidateAsync. , (?) -...
  • ...
0

Source: https://habr.com/ru/post/1676714/


All Articles