Company
Date Published
Author
Kyle Kelly-Yahner
Word count
1095
Language
English
Hacker News points
None

Summary

This article discusses implementing two-factor authentication in an ASP.NET MVC 4 application using Twilio's SMS verification service. The process involves adding a property to the UserProfile entity to store the user's mobile number and a boolean indicating whether the user has verified their phone number through SMS. The application uses SimpleMembershipProvider for user management and generates a six-digit SMS verification code that is sent to the user's registered mobile number via Twilio. After registration, the user is redirected to an SMS verification page where they enter the received code to complete the registration process. The article provides step-by-step instructions on how to implement this feature, including adding properties to the UserProfile entity, installing the Twilio.Mvc package, and updating the AccountController to handle the SMS verification flow.