createClient() doesn't remember previous login? #318
Unanswered
kopi-cloud
asked this question in
Questions
Replies: 1 comment 7 replies
-
Hey @kopi-cloud, did you see we have a react example here: https://github.com/supabase/supabase/blob/master/examples/react-todo-list/README.md This one persists over page refreshes (or at least it did last time I built it). Does your app use a similar setup? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Got a very simple email based signup / login flow working, but refreshing the page loses the login.
I can see that SB is caching details in local storage under key
supabase.auth.token
butcreateClient()
doesn’t seem to read those details back in to the client object.Example app is here: https://rabbit-cabbage.netlify.app
If you signup (don't need a real email address), you'll be logged in and the
/user/
page is just dumping out the result of callingauth.user()
. When you refresh the page, it's just null. But you can see that the login details are saved in the local storage.How do I tell the SB client to use the credentials from local storage so that the user doesn’t have to re-enter login details after hitting refresh?
Beta Was this translation helpful? Give feedback.
All reactions