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

Unlock the full course today

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

Two-factor authentication with SMS in action

Two-factor authentication with SMS in action

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

Start my 1-month free trial

Two-factor authentication with SMS in action

- [Instructor] If you want to create a more secure ASP.NET MVC 5 application, then you need to enable two-factor authentication. So let us first log in using an existing account. After you have logged in, you can click over the username. And in here we are going to see that no two-factor authentication providers have been configured. Now let's go back to Visual Studio. In here go to Solution Explorer, Views, Manage, Index.cshtml, and scroll down to the phone number section. Now let us remove all the necessary comments to enable both the phone number and the two-factor authentication sections. Save the changes, and go back to your application. Refresh the browser, and if you get this error go back to your index.cshtml view inside the Manage folder, and then in the phone number section add the ending tag for the text. Also, you can add an ending square bracket. Save the changes and go back to your browser. Refresh the browser and you will see that everything works fine. So here now, we…

Contents