In my previous 2 blog posts I showed you first how to use the 2 Factor Authentication in ASP.NET Identity 2.0 with email and I then followed it up showing you how easy it is to use it with SMS using the Twilio API. Well, the next logical step is obviously to show you how to use 2 Factor Authentication in ASP.NET Identity 2.o with Google Authenticator. This blog post is going to show you exactly how to do it.
In my previous blog post I demonstrated how to send 2 Factor Authentication security codes via email in the new ASP.NET Identity 2.0 Beta 1. In this blog post I will demonstrate how to send the 2 Factor security codes via SMS by using the Twilio API. This blog post will build on the previous one, so if anything in this post is unclear please refer to that blog post first
A while ago I was looking at doing a blog post about 2 Factor authentication in ASP.NET MVC using Google Authenticator. I then became aware that it was on the roadmap for the ASP.NET Identity team to add to ASP.NET Identity 2.0. Well, ASP.NET Identity 2.0 Beta 1 is now available with 2 Factor Authentication, so in this blog post I will give you a quick overview on how it works and how to implement an email provider for the 2 Factor Authentication.
Update: 19 May 2015 - You can view an updated video version of this on my AspnetCasts YouTube channel. The updated version is targeted for use with ASP.NET MVC 5 and ASP.NET Identity. Update: 1 April 2015 - The latest and most up to date version of this guide is available on the OAuth for ASP.NET website A few months ago I wrote a blog post on how to add a Google+ sign in for ASP.
ASP.NET has had its share of membership systems over the years and with the latest release of Visual Studio 2013 and ASP.NET MVC 5, Microsoft has introduced a new system yet again referred to as ASP.NET Identity. For a good overview of ASP.NET Identity and Microsoft’s rationale on developing yet another new identity system for ASP.NET, please go and read the post entitled Introduction to ASP.NET Identity by Pranav Rastogi.