javascript - Disabling sessions in nodejs Passport.js -


i discovered tokens authentication allows session/stateless servers , starting out mean. looks amazing.

right now, i'm using passport.js authenticate users (via email, facebook, google,...), stores information server session tutorials say:

 // required passport     app.use(express.session({         secret : 'superscret',         expires: new date(+new date + settings.session.sessiontimeout),         store: new mongostore({})     })); // session secret     app.use(passport.initialize());     app.use(passport.session({})); 

is possible still use passport.js instead of storing session, sends token monitor if user has access.

question: how can disable sessions passport? (i know how send token , listen it).

i suggest using satellizer, de-facto standard library token based authentication in angularjs. implements token based authentication , easier working purposes. has server examples, including node.js server example.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -