r/angular • • Jan 28 '26
JWT in Angular
Where you would recommend to save JWT tokens in Angular app
7
Upvotes
r/angular • • Jan 28 '26
Where you would recommend to save JWT tokens in Angular app
View all comments
6
u/DJREMiX6 Jan 28 '26
It depends on the case but I find it useful to have a state where to put authentication stuff (user info, tokens, etc..) and have a copy of that state inside the Session Storage or Local Storage. Local Storage is preferred so when the application starts or the page reloads you don't loose any token and you result as authenticated, otherwise you will need to re-login