-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
useSignIn is not working correctly #1653
Comments
I have the same problem, I don't know if it's a bug or is just me doing something wrong, |
Same issue here. @jackyYam did u figure anything out? |
I was in the same problem, and I fix it, sending valid JWT data be sure that the JWT data that you provides has "exp" expiration time, in the payload, because after that time, the auth-kit eliminates the cookie (or the localstorage) |
I am having the same issue and just wanted to share my very niche scenario just in case it helps someone: In my situation, I created an ASP.NET API backend which came with an Identity solution out of the box. Unfortunately, after troubleshooting this evening I have found it says in on this page:
Before this, I was able to see there was a problem by placing some breakpoints which took me into the You can also add
I appreciate this won't help 99% of people here but for anyone else who wrote a full-fledged backend in ASP.NET to find it doesn't work, this is why. Now I have to go and redo some of the backend again! |
Should this exp time be set in the JWT token or should it be provided in the payload when calling |
In the JWT Token add an attribute called |
Prerequisites:
Please answer the following questions for yourself before asking questions.
Describe the question
A clear detailed description of what is your question.
Give correct references asked in question
I have an application built with Vite & React. I am using the useSignIn hook in order to sign In user, however it does not work. First I implemented a form to login in, expecting to redirect user to a private path using
react-router
and@auth-kit/react-router
. However, the session is not created althoughsignIn
returns true.Then I created a simple test with a page where I perform
signIn
in theuseEffect
like the following:However, the
console.log(isAuthenticated))
still outputs false. (thesignIn
returns true)This is probably a really basic error, but i just couldn't find where i did wrong. So some help would be appreciated
Related issues
If your question is containing an already created issue. Tag the issue
Screenshots
If applicable, add screenshots to help explain your problem.
This is the store I am using
There is also nothing showing in the local storage related to this store
Please provide the following information:
License
MIT © React Auth Kit
The text was updated successfully, but these errors were encountered: