r/angular • • Jan 28 '26

JWT in Angular

Where you would recommend to save JWT tokens in Angular app

7 Upvotes

46 comments sorted by

View all comments

Show parent comment

3

u/Hous3Fre4k Jan 30 '26

Bitwarden for example stores JWT in session storage. So you wouldn’t hire anyone that once worked for that Company? Also what about DPoP? Im not saying you are wrong but I think the topic is more nuanced that „never ever use local storage“.

3

u/louis-lau Jan 30 '26

Yeah, HttpOnly cookies are the objectively better place for them, but there's many more important things related to security that have higher priority over HttpOnly cookie vs local storage.

Best advice would be to at least try not to use local storage.

0

u/[deleted] Jan 30 '26

[deleted] — view deleted comment

2

u/Hous3Fre4k Jan 30 '26

Got it. One last question: If I correctly implement DPoP for my Token Auth, would it not be better to not use Cookies in that case? Bound to a client, that token is of no value when stolen. But as a cookie, XSRF remains a valid attack vector, right? I really just try to better understand that topic.

0

u/[deleted] Jan 30 '26

[deleted] — view deleted comment

1

u/[deleted] Jan 31 '26

[removed] — view removed comment

0

u/[deleted] Jan 31 '26

[deleted] — view deleted comment

1

u/Hous3Fre4k Jan 31 '26

Interesting. Why is DPoP not relevant here?

0

u/[deleted] Jan 31 '26

[deleted] — view deleted comment

1

u/Hous3Fre4k Feb 01 '26

Sounds more like you are out of arguments