-
Notifications
You must be signed in to change notification settings - Fork 187
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
userSignedIn() returns true even with expired/invalid token #466
Comments
You can try setting the option |
@arjenbrandenburgh thanks, that behavior should be perfect and IMO come by default, will try |
Closing this issue. |
@arjenbrandenburgh This solution is not working, it returns 401 and still don't officially logout (clear localstorage things etc) |
it's not signing out because of it is calling signOut function, but signOut will return observer and it will not run because nothing is subscribed to it |
Yes, it makes sense now... I'll try to find another way to fix this issue and also why it logs out in the first place |
@Grafexy Good catch 👍 |
my solution
|
@zinderud where / when / what frequency do you call that isTokenExpired() ? |
my usage
|
I'm submitting a...
Current behavior
I use the UserSignedin() to detect if the user is signed in:
However sometimes after several minutes of login/calls I start receiving 401 errors from the backend, and I conclude that somehow angular-token is assuming it's logged in but don't accepted on the backed.
I am pretty sure this is a bug, but I would like to know what am I doing wrong, and also what's the correct approach to verify it the token is valid and if the user is logged in? I used the validateToken() before but also run in similar issues that's why I switched to this approach
The text was updated successfully, but these errors were encountered: