# MFA with Authenticator does not work immediately after invite

**URL:** <https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909>\
**Category:** Get Help\
**Tags:** one-time-password-otp-factor, mfa\
**Created:** [September 22, 2023, 3:18am UTC](https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909 "2023-09-22T03:18:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stappan](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@stappan](https://community.auth0.com/u/stappan)\
**Post date:** [September 22, 2023, 3:18am UTC](https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909/1 "2023-09-22T03:18:31Z")

</div>

Hi,

We use a post-login script to activate MFA for specific users (after an email invite). The scenario for the issue we’re experiencing is as follows:

- user has entered password after having clicked on a link in an invite email
- user is then presented with MFA dialog, and selects “Authenticator”
- user downloads Google or Microsoft Authenticator, then enters the verification code from the app into the Auth0 verification page

The problem is that (and this happens all the time following an email invite), the verification code is not accepted - It sometimes takes up to a third attempt to get this working. Sometimes it takes more. Could this behavior be related to a delay in the Auth0 back-end (we are testing with a non-production tenant and only enrolling the user post authentication).

Side note: Obviously this would be a show-stopper for us if this happens in production!

Thank you in advance,

Shaune

---

<div class="post-metadata">

**Author:** ![nathan.jenkins](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nathan.jenkins/32/44577_2.png) [@nathan.jenkins](https://community.auth0.com/u/nathan.jenkins)\
**Post date:** [October 3, 2023, 7:14pm UTC](https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909/2 "2023-10-03T19:14:44Z")

</div>

Hi @stappan , welcome to the Auth0 Community!

A common reason why this may not be working as expected is due to the device time setting not being in sync with the UTC time of the code, [See Troubleshooting information here](https://auth0.com/docs/troubleshoot/authentication-issues/troubleshoot-mfa-issues#rejected-codes).  
You may have already checked this. Do you see the same issue occur with different devices?

---

<div class="post-metadata">

**Author:** ![stappan](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@stappan](https://community.auth0.com/u/stappan)\
**Post date:** [October 3, 2023, 8:49pm UTC](https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909/3 "2023-10-03T20:49:23Z")

</div>

Thank you for your response. The root cause of this issue had to do with the post-login script being called more than once. We consulted with the support team, who referred us to this:

[https://community.auth0.com/t/mfa-once-per-session-action/110147](https://community.auth0.com/t/mfa-once-per-session-action/110147)

Adding in the condition (to check whether MFA had already been enabled) solved the problem for us.

---

<div class="post-metadata">

**Author:** ![nathan.jenkins](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nathan.jenkins/32/44577_2.png) [@nathan.jenkins](https://community.auth0.com/u/nathan.jenkins)\
**Post date:** [October 4, 2023, 8:03am UTC](https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909/4 "2023-10-04T08:03:16Z")

</div>

Hi @stappan ,  
Glad to hear that this was resolved and thank you for providing the solution 👍

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 18, 2023, 8:03am UTC](https://community.auth0.com/t/mfa-with-authenticator-does-not-work-immediately-after-invite/116909/5 "2023-10-18T08:03:38Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
