-
Notifications
You must be signed in to change notification settings - Fork 24
The user is undefined after a page refresh. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
indeed i expect gotrue-js would store it in localstorage. i am wondering if theres some CORS issue here. EDIT: it seems to be a known issue - netlify/gotrue-js#35 we may just need to |
fixed in https://github.com/sw-yx/react-netlify-identity/releases/tag/0.0.7 i think - please lmk if it doesnt |
Hey @sw-yx this is fixed on production but doesn't appear to be fixed when testing @ localhost. Would be nice to have this for testing. |
hey @michalczaplinski and @b-reklass turns out it might be my fault - see this PR #2 |
@sw-yx Sorry, I went with another solution for auth in the meantime, but I ll definitely use this on another project and let you know how it works. Thanks for the great work ! :) |
no problem. i made this when i was just learning, but i use this project more intensively now so ive ironed out a few more flaws sicne then. |
A page refresh logs a user out. This behaviour can be seen in the example linked in the README.
To reproduce:
Go to https://netlify-gotrue-in-react.netlify.com/
I can log in by providing by the url to my identity service: https://dropclub.netlify.com
After logging in I'm redirected to
/dashboard
. Then, when I refresh the page I am redirected back to the login page and I can see thatuser
isundefined
in the console.I was under the impression that gotrue-js should be storing the user information in
localStorage
for me. Is this functionality outside of the scope of this package or would you expect it to work?The text was updated successfully, but these errors were encountered: