DEV Community

How to Handle sessoions in an angular app

Hrn Svncハルン on July 03, 2020

As the title says, i want to know what is the "best practice" or guideline to handle user sessions in Angular. Currently i work on a SPA where i us...
Collapse
 
brandinchiu profile image
Brandin Chiu

I can't personally think of a reason why using a JWT for a session would be objectively wrong.

JWT might be overkill a bit if you don't plan on sharing the session with another application or service, but I wouldn't consider it wrong.

Any encoded identifier that your application can use to determine who a "signed-in" user is should be fine. JWT falls in that group.