How to Enable Google Authenticator MFA in Auth0-Lock for React.js?

Hello everyone,

I am using auth0-lock in my React.js application to handle user authentication. Now, I want to enable Multi-Factor Authentication (MFA) using Google Authenticator. However, I couldn’t find any mention of auth0-lock supporting MFA in the official documentation:
:point_right: [Auth0 Lock Documentation] auth0com/docs/libraries/lock

I have already enabled Google Authenticator MFA in my Auth0 Dashboard under Security → Multi-factor Authentication, but I am unsure how to integrate it with auth0-lock in my React app.

If anyone has experience implementing this, I would really appreciate detailed guidance or example code.

Thanks in advance! :rocket:

Currently, I use this package: https://www.npmjs.com/package/auth0-lock/v/11.34.1#customization

Hi @hao.bui

Welcome to the Auth0 Community!

If you are using Auth0 Lock and you are redirecting from your React application to the Auth0 Lock, then by enabling the MFA in the dashboard, users should be automatically asked to enroll and prompted to use it whenever they log in. Please note that the redirect mode is the default for Auth0 Lock.

However, if you are using Popup mode, MFA will not be supported as mentioned in our documentation.

If you have any other questions, feel free to leave a reply!

Kind Regards,
Nik

1 Like

Thanks for your response!

I just realized that I am currently using popup mode in Auth0 Lock, which, as you mentioned, does not support MFA. That explains why users are not being prompted for Google Authenticator verification.

Best regards,
Hao