From the course: ASP.NET MVC 5 Identity: Authentication and Authorization

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Two-factor authentication with SMS setup: Twilio

Two-factor authentication with SMS setup: Twilio

From the course: ASP.NET MVC 5 Identity: Authentication and Authorization

Start my 1-month free trial

Two-factor authentication with SMS setup: Twilio

- [Instructor] If you want to create a more secure ASP.NET MVC application then you can enable two-factor authentication. On this part, we are going to see how we can configure the phone numbers for our users. We are going to do that by using Twilio package. So for that let us just go to Tools, NuGet Package Manager, Package Manger Console. And here write Install-Package Twilio. After the Twilio has been installed go to Solution Explorer. Inside the App_Start folder we are going to see the IdentityConfig.cs file and here we have two services, EmailService and SmsService. We are going to use the SendAsync method within the SmsService to send SMS to our users in order for them to configure their phone numbers. But before we proceed further, let us go to twilio.com and get all the necessary configurations. Sign up for a new account if you don't have one or just login with your existing account. So I will first copy the account SID value, go to my solution and create a new constant…

Contents