Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Swap/Dump session data using passport.js

Swap/Dump session data using passport.js


I am using Passport for my MEAN stack-based app, that makes use of several APIs that require several OAuth tokens. Because logging in and out causes too much overhead, I am considering to put serialized session data in a Redis store then swap back and forth between existing sessions.

So my question is, is there a way to programmatically extract and/or replace passport data ?

Problem courtesy of: Mehdi Chibouni


You could try storing the information in MongoDB by using serializeUser() and get it back using deserializeUser()?

Solution courtesy of: jaffamcneill


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Swap/Dump session data using passport.js


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription