Skip to content
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

Often state is loaded from memory cache after recent session storage erase. #146

Open
rsivan opened this issue Feb 1, 2021 · 3 comments

Comments

@rsivan
Copy link

rsivan commented Feb 1, 2021

Versions (please complete the following information):

  • NgxWebstorage: 7.0.1
  • Angular: 11.1.1

Describe the bug
After I logout from my application, and verify, in Chrome's DevTools, that the session storage fields are indeed cleared as expected, some of the annotated fields (@sessionStorage) still return the previously saved value.

I changed some of those to SessionStorageService and the problem gets resolved, which indicates the bug is there only on the annotated fields.

To Reproduce
I did not create a sample.

Screenshots
Screen Shot 2021-02-01 at 09 18 15

Desktop (please complete the following information):

  • OS: MacOS 11.1
  • Browser chrome
  • Version 88.0.4324.96

Additional context
Add any other context about the problem here.

Reported previously in issue #107 by someone else, with my recent comments.

@rsivan
Copy link
Author

rsivan commented Feb 23, 2021

Update: I added code to fully reboot angular after logout. This was important for my app, among others, for security reasons, but also state reset, so services would not keep state from the previous login (see https://stackoverflow.com/questions/43234416/resetting-angular-2-app).
Although that fixed some app issues, this particular bug did not get fixed with the new code.

@rsivan
Copy link
Author

rsivan commented Feb 26, 2021

Decided to fully reload the page upon logout, which is a good idea anyway.
This fixes my problem but the bug is still a bug, so I leave the bug open.

@chandrn
Copy link

chandrn commented Jul 7, 2022

Ran into the same issue.
The value is still returned after clearing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants