How to handle session with angular2 and nodejs

78 Views Asked by At

I have been working with express-session for a long time with mongodb as session store , so now I got the chance to work with frontend framework which is angular 2 and I was wondering how to maintain session across frontend and server as both are running on different ports

So for person working on express-session is there any way to use that with angular or do I have to move to JWT

In future I would have to integrate socketIO as well to the project, So what is the right way to go about this

1

There are 1 best solutions below

0
On

You can handle sessions with Angular 2+ the same way you would with any other web site. In fact, using Express Session is all you need to do, as session management is handled automatically by the browser.