title: ASP.NET MVC 5 Identity 2.0 & OWIN Two Factor Authentication by using existing DB
body: <p>I've just started with MVC after working on Web Forms for 4 years. I've watched few videos explaining the architecture/fundamentals and I'm now able to replicate few modules of my old project with MVC5 using EF6.</p>
  
  <p>I've a SQL Server DB containing tables such as Albums/Artists/Titles/Reviews and he User Table. I was able to work with the first set of tables using EF6 just fine including inserts/deletes. The prev project I had implemented custom Web Forms authentication using BCrypt by storing the details in the User table and later doing the validations and setting the auth cookie.</p>
  
  <p>User table has details such as UserId, PWHash, EMail, FirstName, LastName. The UserId is a FK in the Reviews table and few others.</p>
  
  <p>The implementation I'm hoping for is as below:</p>
  
  <pre><code>  1. Login screen accepts credentials and validates with existing User table.
    2. If valid, move to the 2FA screen(eMail/SMS).
    3. If valid, then allow access to application.
  </code></pre>
  
  <p>Most of the tutorials say how to extend the attributes such as FirstName/LastName but do not say how to use an existing DB. I'm planning to use bcrypt/scrypt to encrypt the sensitive details.</p>
  
  <p>I've gone through <a href="https://stackoverflow.com/questions/21385582/mvc-5-asp-net-identity-implementation-confusion">MVC 5 &amp; ASP.NET Identity - Implementation Confusion</a> but id doesn't have all the answers to my queries</p>
  
  <p>I just need the starting point on how to plug the existing DB instead of using the dbcontext provided by default</p>