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

Is it safe to save token in localStorage ? #12

Open
slashtu opened this issue Mar 9, 2016 · 3 comments
Open

Is it safe to save token in localStorage ? #12

slashtu opened this issue Mar 9, 2016 · 3 comments

Comments

@slashtu
Copy link

slashtu commented Mar 9, 2016

localStorage can be accessed by JS, How to prevent XSS attacks?

@sebadoom
Copy link

Indeed. Switching to cookies is the right way of dealing with this. You would still need to sort out CSRF issues, but those can be dealt with in a safer way.

@lnpbk
Copy link

lnpbk commented Oct 17, 2016

@slashtu If a token is modified, it fails decryption on the server-side, which can be caught before any sensitive data is returned.

@hegdeashwin
Copy link

hegdeashwin commented Nov 15, 2016

If you are using your application on iOS Safari in private mode ... HTML 5 storage feature will not work ... 1 more reason to use cookie instead of local storage in case your web app. is supporting devices

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

4 participants