简体   繁体   中英

if I store access token (JWT) in my local storage of angular project what is wrong in it?

if I store token in my local storage of angular project what is wrong in it. Apart from this, what is the other way to store token in my project because I am using client-side framework so everything is open to see if I use local/session storage, indexedDB, cookies

Cross Site Request Forgery(CSRF) is a pertinent problem when you store the token in localStorage. Do not store JWT in the local storage. Refer to this link for more details Where to store JWT in browser? How to protect against CSRF?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM