-
Notifications
You must be signed in to change notification settings - Fork 181
Description
Hi !
I've been having an issue with the "session" when using multiple tabs, and in rare cases (not reproducible yet) when using just one too.
After digging into the library code, I found the following problem: At angular2-token.service, when making a new request, it checks for this.atCurrentAuthData != null but this local variable may have old data, as another request from another app (like the same app in another tab) may have updated the localStorage with new data.
One solution could be to just read and write from and to localStorage directly. Another possibility could be to check if the local variable's data is updated before using it (it needs one read from localStorage anyways).
Hope it helps anybody and thanks for developing this library.