I'm using Connect + ExpressJs.
I'm confused about the point of sessions and session management while writing RESTfull API. Can anyone explain to me the point of session management here?
Edit:
Was going through this example on ExpressJs which does indulge in sessions:
https://github.com/visionmedia/express/blob/master/examples/auth/app.js
And thus was confused about the usage of sessions if I'm doing an Oauth2.0 API.
You don't need session management when you're writing a RESTful API unless you plan on doing something that would need to authenticate the user across multiple requests. For example, maybe you want a user with a cookie to not need to use an API token or you want to cut back on database requests by using cookies.
Most REST services just look up a user using some kind of API key or token though, so no sessions are necessary.
These questions might be helpful: