# MFA Authorization Error

**URL:** <https://community.auth0.com/t/mfa-authorization-error/138819>\
**Category:** Get Help\
**Tags:** push-via-auth0-guardian-factor, mfa\
**Created:** [July 13, 2024, 9:41pm UTC](https://community.auth0.com/t/mfa-authorization-error/138819 "2024-07-13T21:41:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkreiger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nkreiger/32/56171_2.png) [@nkreiger](https://community.auth0.com/u/nkreiger)\
**Post date:** [July 13, 2024, 9:41pm UTC](https://community.auth0.com/t/mfa-authorization-error/138819/1 "2024-07-13T21:41:31Z")

</div>

A bit baffled on this one,

after toggling on:

 ![Screenshot 2024-07-13 at 5.39.43 PM](https://global.discourse-cdn.com/auth0/original/3X/b/a/ba97b32f7362c8fd99935e0416a6c4fa71e8a079.png)

I now see:

```auto
{"error":"invalid_grant","error_description":"Invalid authorization code"}

```

When performing the login. I have walked through the flow line by line, and nothing has changed, except the request now errors out.

Is there something I need to pass in from the returned code and state? I see the code is properly passed into the request after the redirect from MFA, but when its enabled, it now fails.

When I turn off the policy, it works fine.

I am using `vue-auth0`

Code looks something like this:

```auto
const ap = {
    redirect_uri: ruri(),
    audience: `https://${auth0InitOptions.audience}/api/v2/`,
  }

if (queryParams?.organization) {
    ap.organization = queryParams?.organization;
  }

  if (queryParams?.invitation) {
    ap.invitation = queryParams?.invitation;
  }

const auth0Plugin = createAuth0({
    domain: auth0InitOptions.domain,
    clientId: auth0InitOptions.clientId,
    useCookiesForTransactions: true,
    authorizationParams: ap,
  })
  app.use(auth0Plugin);

  try {
    debugger;
    await auth0Plugin.handleRedirectCallback();
  } catch (err) {
    debugger;
    console.warn(err)
  } finally {
    try {
      await delay(400) // short delay for token check
      debugger;
      await auth0Plugin.getAccessTokenSilently();
      debugger;

```

I know from other threads the common errors is the authorization code is:

expired  
issues to another client  
does not match the redirect URI

However, all of these cases can be ruled out, because it works fine if I just toggle off MFA. There is something with the MFA policy that is causing the issue.

---

<div class="post-metadata">

**Author:** ![nkreiger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nkreiger/32/56171_2.png) [@nkreiger](https://community.auth0.com/u/nkreiger)\
**Post date:** [July 15, 2024, 1:20pm UTC](https://community.auth0.com/t/mfa-authorization-error/138819/2 "2024-07-15T13:20:06Z")

</div>

Found the solution buried here:

> **[Configure Silent Authentication](https://auth0.com/docs/authenticate/login/configure-silent-authentication#silent-authentication-with-multi-factor-authentication)**
>
> Learn how to keep users logged in to your application using silent authentication.

---

<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:** [July 29, 2024, 1:20pm UTC](https://community.auth0.com/t/mfa-authorization-error/138819/3 "2024-07-29T13:20:58Z")

</div>

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