2 factor login for experience user

Can 2 factor login be setup for an experience user?

Hi @Lars_Andersson,

The logic for two-factor authentication could be configured within a workflow, did you have a specific method or service in mind?

There is also an interesting forum post where a user created a login and CAPTCHA within their experience. It may provide some inspiration, so if you’re interested, you can check it out here!

Thanks,
Julia

1 Like

Hi @JuliaKempf
I’m also interested in how to do MFA (two-factor authentication) for experience users. Can it be done using Microsoft Authenticator or Google?

thanks

Josh

@Josh_Bell, @Lars_Andersson,

We’ve been doing some thinking and research for you.

These are the general instructions but I’m adding this to our list of examples to make. You should be able to accomplish 2FA through a couple of methods:

SMS & Email

This route requires some effort. Depending on your preference of SMS and Email (the process would be very similar), you can implement your own 2FA flow in Losant.

You could use Twilio or SendGrid as the services to send the messages.

You would need to build at least two experience workflows.

  1. Generate Token Workflow - This workflow will generate the token for the user, and send via email or SMS.
  2. Verify Token Workflow - This workflow accepts a token from a user, verifies it, and set their authentication cookie.

I recommend using JWT Tokens for the secrets. You can learn more about JWT Tokens here. You will have to store a secret or one-time code for the user. The best place for this is Experience User Tags.

2FA via Rest API

I think this one would be the easiest to integrate. You can use the HTTP Node to talk to the Authy API.