Home > OS >  JWT or express-session in MERN application?
JWT or express-session in MERN application?

Time:06-01

I have a doubt, it's better use jwt token or express-session in mern application? In this moment i use jwt, but i can't find a method to get ad admin authorization safely. And is better store user in localstorage or cookie? Who is the best method?

CodePudding user response:

In modern web applications, JWTs are widely used as it scales better than that of a session-cookie based because tokens are stored on the client-side while the session uses the server memory to store user data, and this might be an issue when a large number of users are accessing the application at once.

  • Related