Users get immediately logged out

Dear Everyone,

I’m having a hard time figuring out what is the problem with my app currently in dev phase. My problem is that the user gets logout out immediately after logging in. I’m building a ReactJS app, I was following the Auth0 guide for React. At this point I don’t have any more ideas what could be configured wrong or what’s happening.

Hi @banyai.evelin,

Welcome to the Community!

Can you give us more information? Code snippets are helpful, screenshot of the network requests from the DevTools Network tab. Do you see any errors? Have you changed anything from the original implementation?

Dear @dan.woda ,

Thank you for your reply. No, I haven’t seen any error. When I checked on the Auth0 Dashboard the logs, I saw my test users got logged out within 0,1 secs after logging in. I figured out the problem must be within my React side code, since I had my previous test app and it still worked with the current Auth0 setup.

However, - kind of embarrassing - after killing almost 2 days in debugging my small app, and just making a last check for the 10+th time before posting the relevant code snippets here, I found the problem. I messed up my logout Button’s onClick function in a way that it made to run the code immediately…

That code part was on my suspect list, but could not see how it differed from the original one - in the tutorial - even checking it like 10 times.

2 Likes

Glad you found a solution! I’m going to mark this solved.

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