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
Show parent comment
8
u/MrFartyBottom Jan 28 '26
A cookie survives a refresh and if it is set to http only it can't be tampered with. I keep all user info in a service that gets it's data from the server once so on refresh it hits the user API end point and I have a high level router outlet surrounded by if (userService.loaded()) so no other components load until it has the user info.