My page is unstoppably reloaded with different code queries in the link

A bug regarding the Auth0 login process

I’m currently using Auth0 React SDK to set up Auth0 in my React app. I’ve encountered an issue with the login process. (Auth0 React SDK Quickstarts: Add Login to your React App)

What is the problem?
After successfully logging in, the app redirects to the home page, but it keeps reloading endlessly, and the address bar displays different values for a query parameter named ‘code.’

What I expected?
I expected that there was no any bug occurring since the setup process of Auth0 for React in the Auth0 documentation looked clear and easy to understand.

What are my solutions?
I tried to make sure that there are not any failed login or failed exchange statuses by checking logs. When I check the ‘Monitoring’ => ‘Logs’ section on the Auth0 Dashboard, I notice numerous entries with ‘success login’ and ‘success exchanges’ statuses.

Since the encoded code value is only available if something is set by the client application in the /authorize request, my suspicion is that the AuthProvider isn’t functioning correctly, causing the isAuthenticated state to always be false and triggering the loginWithRedirect function repeatedly.

Thanks for your helps!

Below is my code, along with a description of what my logs look like.




1 Like

i found the same problem. Are you or anyone know how to solve it already?