Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How could I confirm a new user registration via SMS?

I am building a mobile-focused web application, to later convert to hybrid, and I would prefer new user registrations confirm the user's phone number versus their email address.

I would like to send a new user an SMS with a unique code. When they first log in, they must enter that code to activate their account.

I have a custom SMS service that is sending SMS fine, and would like to know how to integrate this into the Identity registration process.

Please note that I do not wish to use SMS for routine two-factor authentication.

like image 897
ProfK Avatar asked Oct 03 '15 14:10

ProfK


1 Answers

You can use create additional actions in your account controller and use methods from Microsoft.AspNet.Identity.Core

  1. UserManager.GenerateChangePhoneNumberToken
  2. Send sms with token
  3. UserManager.VerifyChangePhoneNumberToken
  4. Add custom logic to authorization
like image 196
Sam Zakhezin Avatar answered Nov 02 '22 07:11

Sam Zakhezin