Open sudeka opened 9 years ago
Even I'm facing the same issue .. Any workaround ?
Also having the same problem, any updates?
Same problem here. Did you find a sufficient work around?
No workaround but I didn't have a problem with this until we tested on firefox. For some reason it won't save properly. I tried to swap the redirect for a call in the frontend but to no avail.
Does anyone know a better package for this situation? Even express-session had been malfunctioning for this.
Hi,
My code is pasted below. In the callback method, I set the user, but when I redirect to '/' the user is no longer available. I'm using passport and client-sessions. Any help would be greatly appreciated.
Thank you.
app.get('/', function (req, res) { if (req.session_state.user == null) { passport.authenticate('azureoauth', { failureRedirect: './'}) } else { res.render('index', {user: req.session_state.user}); } });
//This gets called by an external internet application
app.get('/auth/azureOAuth/callback', passport.authenticate('azureoauth', {}), function (req, res) { req.session_state.user = req.user; res.redirect("/"); });
And in my app.js, I have the following code: const clientSession = require("client-sessions"); app.use(clientSession({secret: 'blablabla', duration: 1000 * 60 * 60 * 24 * 365 * 10})); app.use(passport.initialize()); // for uauthentication/authorization app.use(passport.session());