React+Auth0 - Unable to issue redirect for OAuth 2.0 transaction

Hi everyone, I have used Auth0 for login/signup in my React project, it is running in my local, but, when I try to login my user they are getting logged in(I see them in the user management application) but it gets redirected to a page that shows the error Unable to issue redirect for OAuth 2.0 transaction

Below is my code :

<Auth0Provider
    domain='dev-kbwaywymik8nd81z.us.auth0.com'
    clientId='WuyDoh53Eaka64w7btCoSNcbw045CNlu'
    authorizationParams={{
      redirect_uri: window.location.origin,
    }}
    cacheLocation='localstorage'
  >
{/* rest of the tags here */}
  </Auth0Provider>

And I am triggering the action here:

<button type='button' className='auth-btn' onClick={loginWithRedirect}>
   Login <FaUserPlus />
</button>

Can someone tell me where I am going wrong?

1 Like

Hello @he_man_she welcome to the community :smiley_cat:

Typically, that error is thrown when there is an issue with the redirect_uri - If you inspect the network tab when clicking to log in, do you see the redirect_uri param included in the authorize request? Additionally, I would double check to make sure whatever you expect the redirect_uri to be is defined as an allowed callback url in your application settings in Auth0:

Keep us posted!

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