-
Notifications
You must be signed in to change notification settings - Fork 264
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
isAuthenticated and user are null after login #93
Comments
I am seeing this as well, although it only happens in Safari and not chrome |
I'm seeing this as well. I commented on #82 and left some comments as to where I got to. |
Hi @MuddyBootsCode - thanks for raising this The code in your If
|
Response:
|
Thanks for the detailed response @MuddyBootsCode! It looks like we have an issue with our tenant dashboard configuration. An "Application Type" of "Single Page Application" should not have "Token Endpoint Authentication Method" set to "POST" (it should be set to "None") - this is why you are getting Can you try and toggle the "Application Type" to something else, then back to "Single Page Application" and make sure that the settings look like: In the meantime - I'll raise an issue internally to find out why you got that incorrect configuration in your tenant Lastly can you confirm if this is your "Default App"? |
I was able to change the Token Endpoint Authentication to "None", after changing the application type to another option. I can confirm that it is my default app. I made the change and that has allowed the App to work and login and out correctly. |
Thanks @MuddyBootsCode! I think a few users are effected by this, so I'm going to leave this issue open until we can resolve the dashboard configuration issue internally. |
"Token Endpoint Authentication Method" defaulted to Oddly enough though, this wasn't the cause for
@adamjmcgrath does it make sense that a redirect would break the auth flow? The component I'm logging from is always mounted (i.e. the redirect has no affect on it). My session isn't persisting across refreshes either yet so I still need to figure that piece out (and reimplement the redirect). All this said, I'm still loving Auth0 and I appreciate the work that's been done on this package to make it (almost) seamless for react users. |
An update: sessions were persisting through refreshes just not with the default google connection. That thread seems to have a good resolution in terms of not using the dev keys, maybe those settings or the quick start docs can be updated to mention that limitation of the default google setup. Haven't figured out the redirect issue yet, so any thoughts on that front would be still be useful. Happy to create a separate issue so as not to pollute this thread anymore if you'd like. |
Also experiencing this issue. After a successful universal login the user is redirected to the app After page reload isAuthenticated is true and the user is properly fetched. Using This occurs on both Safari and Chrome. |
We are experimenting same issue than @DevonYarbrough. We are using passwordless (link) integration. |
Hi @vibaiher-qatium @DevonYarbrough - it looks like your client is misconfigured - have look at the advice in #93 (comment) @skipjack feel free to raise a different issue if the problem you're having has not been resolved by #93 (comment) |
I've checked the configuration, it looks like #93 comment. I think it's related with: auth0/auth0-spa-js#564 (comment), I can open a new issue if you want. |
Hi @adamjmcgrath, Appreciate the response. The token endpoint authentication method is set to "None" in the dashboard (In fact, it is disabled and none is selected, so there is no option to change it to anything else. I'm assuming this is because it's a Single Page Application). |
Same thing is happening for me. Successful Universal Login via Google Social, redirects to my site using "@auth0/auth0-react": "^1.1.0", isAuthenticated is false. If I refresh my browser, isAuthenticated is true and my routing works. |
Hi guys. Does anyone have a solution for this yet? Even after I refresh the page, isAuthenticated always stays false after 2 renders, no matter what I do for the single page application. I followed the tutorial on the site, and 'none' is ticked for the "Token Endpoint Authentication" Method in the settings. This is however not the default app. |
Hi @EddieGr - have a look at the FAQs on "User is not logged in after page refresh" https://github.com/auth0/auth0-react/blob/master/FAQ.md#1-user-is-not-logged-in-after-page-refresh If you're still seeing an issue, please raise a new bug. The issue in our Dashboard that required the workaround in #93 (comment) is now fixed, so I'm going to close this bug. |
Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.
Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.
By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.
Description
When using Aut0/auth0-react and the useAuth0 hook:
After logging in the application isAuthenticated is still false and user is undefined.
Reproduction
Add the package and follow direction on the Auth0 quick start page https://auth0.com/docs/quickstart/spa/react/01-login
login the application and get automatically redirected to the home page.
Index.js
Environment
Versions:
The text was updated successfully, but these errors were encountered: