# "You are using a callback URL with a wildcard error" after updating from auth0 react v1 to v2

**URL:** <https://community.auth0.com/t/you-are-using-a-callback-url-with-a-wildcard-error-after-updating-from-auth0-react-v1-to-v2/113269>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [August 9, 2023, 4:33pm UTC](https://community.auth0.com/t/you-are-using-a-callback-url-with-a-wildcard-error-after-updating-from-auth0-react-v1-to-v2/113269 "2023-08-09T16:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel.cunha](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gabriel.cunha/32/49738_2.png) [@gabriel.cunha](https://community.auth0.com/u/gabriel.cunha)\
**Post date:** [August 9, 2023, 4:33pm UTC](https://community.auth0.com/t/you-are-using-a-callback-url-with-a-wildcard-error-after-updating-from-auth0-react-v1-to-v2/113269/1 "2023-08-09T16:33:57Z")

</div>

Hey guys, so I updated my auth0-react from v1.12 to v2.2.0 and followed the migration guide.  
After updating when I’m redirect to the CLU I get the following error, but with the previous version everything worked fine.

 ![Screenshot from 2023-08-09 13-24-05](https://global.discourse-cdn.com/auth0/original/3X/0/f/0f35bae61393d3c81ef4fcf7227c31e65944fb49.png)

**This is my code before updating:**

provider code

```auto
<Auth0Provider
      domain={process.env.NEXT_PUBLIC_AUTH0_DOMAIN }
      clientId={process.env.NEXT_PUBLIC_AUTH0_CLIENT_ID}
      redirectUri={typeof window !== 'undefined' ? window.location.origin : undefined}
      onRedirectCallback={onRedirectCallback}
      audience='https://app.estudojo.com.br'
      cacheLocation='localstorage'
    >

```

login redirect

```auto
  await auth.loginWithRedirect({
        appState: {
          returnTo: window.location.pathname
        }
      })

```

**This is my code after updating:**

provider code

```auto
         domain={process.env.NEXT_PUBLIC_AUTH0_DOMAIN }
      clientId={process.env.NEXT_PUBLIC_AUTH0_CLIENT_ID}
      authorizationParams={{
        audience: 'https://app.estudojo.com.br',
        redirect_url: 'https://teste.estudojo.com.br:3001'
      }}
      onRedirectCallback={onRedirectCallback}
      cacheLocation='localstorage'
      useRefreshTokens={true}
    >

```

login redirect

```auto
   await auth.loginWithRedirect({
        appState: {
          returnTo: window.location.pathname
        }
      })

```

Those are my allowed callbacks URLs:\>

```auto
https://*.estudojo.com.br, https://*.estudojo.com.br:3001, https://teste.estudojo.com.br:3001

```

When comparing both functional and broke CLU url, I found out that the v1 scope is “openid profile email” and v2 is “openid profile email _ **offline\_access** _”

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [August 14, 2023, 3:19pm UTC](https://community.auth0.com/t/you-are-using-a-callback-url-with-a-wildcard-error-after-updating-from-auth0-react-v1-to-v2/113269/3 "2023-08-14T15:19:28Z")

</div>

Hi @gabriel.cunha,

Welcome to the Auth0 Community!

If you remove the wildcards from the callback URL, does that resolve the error?

---

<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:** [August 29, 2023, 1:05pm UTC](https://community.auth0.com/t/you-are-using-a-callback-url-with-a-wildcard-error-after-updating-from-auth0-react-v1-to-v2/113269/4 "2023-08-29T13:05:24Z")

</div>

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