angular-token icon indicating copy to clipboard operation
angular-token copied to clipboard

Token is lost when run multiple refreshs (in different tabs)

Open betosalvador opened this issue 7 years ago • 5 comments

Hello

When I do multiple refreshs in different tabs, the token is lost and I receive a "unauthenticated" status from server.

This is a correct behavior?

I have a page that must be refeshed after 5 seconds in loop.

And this problem occurs when I have more than one tab in this same page.

THanks in advance!

betosalvador avatar Jul 13 '18 19:07 betosalvador

@betosalvador, which version are you using?

arjenbrandenburgh avatar Jul 13 '18 19:07 arjenbrandenburgh

@arjenbrandenburgh

I'm using "0.2.0-beta.14"

betosalvador avatar Jul 14 '18 01:07 betosalvador

Do you experience this issue with the 6.0.0-rc.2 version? If possible, I would advise you to upgrade to this version if you also run Angular6

arjenbrandenburgh avatar Jul 17 '18 19:07 arjenbrandenburgh

Hi @arjenbrandenburgh

I will do this updates that you recomended and post a feedback thanks

betosalvador avatar Jul 22 '18 13:07 betosalvador

I'm running to a similar issue running 6.0.0-rc.4 and angular 6.0.3.

Session is lost after a refresh and I need to run .validateToken() to require it. May be unrelated, but I'm also seeing that if a token expires, you can still pass the auth guards, even if validateToken() returns a 401.

My plan for now is to just run a validation check on init.

jassok avatar Jul 25 '18 16:07 jassok