User needs to refresh the page to get logged in after third party auth (Supabase, NextJS)
Hello everyone,
I'm using supabase with next and third party auth. The problem is that my user has to refresh the page to get logged in after using third party auth. I have tried getting the user's data from the client side with supabase methods and useEffect and from the server side with getServerSideProps with supabase methods and sql request but my userState won't update. However I can see the created user token in my localStorage and in the cookies...
This problem occurs only online, when I'm on localhost everything is working. When the user is loggin in with email everything is working. I noticed that the token is persisting in the url when I'm on local, but it flashes then diasapear when I'm online.
Thanks to anyone who could help.
I'm using supabase with next and third party auth. The problem is that my user has to refresh the page to get logged in after using third party auth. I have tried getting the user's data from the client side with supabase methods and useEffect and from the server side with getServerSideProps with supabase methods and sql request but my userState won't update. However I can see the created user token in my localStorage and in the cookies...
This problem occurs only online, when I'm on localhost everything is working. When the user is loggin in with email everything is working. I noticed that the token is persisting in the url when I'm on local, but it flashes then diasapear when I'm online.
Thanks to anyone who could help.