Two Factor Authentication in Orchard

Topics: Customizing Orchard
Apr 28, 2015 at 5:52 PM
Edited Apr 28, 2015 at 9:40 PM
I'm looking into setting up TFA in Orchard with the Google Authenticator app using the Google Authenticator nuget package. I will need to tie into the user login process to accomplish this and was wondering what the best method would be. My original thought was to base it on the LoggingIn event that gets triggered before the user is actually logged in.

I also wanted to create a UserTFAPart that is connected to the User content item and determines whether or not the user has set up TFA on their account. Is there a method already built in that will allow me to connect the parts' records in the database? I was thinking I could either store the user id in the UserTFAPartRecord or alter the User content item directly in the Migrations file to include the UserTFAPart.

Thank you.