Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bunnynut 136 posts 318 karma points
    Nov 07, 2017 @ 09:02
    Bunnynut
    0

    Implementing Two Factor authentication for Umbraco Users

    I am trying to implement Two Factor authentication for Umbraco users using Google Authenticator. I have created an extra table in the database in which I store wether the user logging in has already set up two factor authentication, if this is not the case an email with a QR-Code is sent by email which they can scan with their phone using the Google Authenticator app. In the login dialog I want to add an extra field where they can enter the code the app has provided them and then check that code.

    I already have written the code to create the QR-code and check the validity of the code entered, but now I'm trying to figure out where to put in this code in the authentication process. I have found the code where the user is authenticated and the result of that process is handled on the client. I also noticed in that part of the code that a statuscode of 402 is returned by the server when a TwoFactor setting is set. I have checked the documentation and the source but i can't a setting with that name. What is the correct way to add this extra step to the authentication process?

    Someone already pointed me to Starter Kits but I don't see who that would help me in this situation.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Nov 07, 2017 @ 15:59
    Sebastiaan Janssen
    101

    Hi there,

    I have some sample code available here: https://github.com/nul800sebastiaan/YubiKey2Factor

    Note that this includes a dashboard for setting up the Google Authenticator bits, might be a bit easier and less clumsy then having to do this through email.

    Note that, unfortunately, we just found and fixed a bug, so this will only work for the admin user at the moment. This is hopefully fixed in the next version soon: http://issues.umbraco.org/issue/U4-10620

  • Bunnynut 136 posts 318 karma points
    Nov 08, 2017 @ 09:33
    Bunnynut
    0

    Hi Sebastiaan,

    Thank you very much, I'm going to try your sample!

Please Sign in or register to post replies

Write your reply to:

Draft