jaredhanson/passport-local

deserializeUser never called if cors() is used

kaysonli opened this issue · 2 comments

app.use(cors({ origin: '*' }));
var expressSession = require('express-session');
app.use(expressSession({ secret: 'petmeet' }));
app.use(passport.initialize());
app.use(passport.session());
If cors() module is used, passport.deserializeUser will not be called.

👍

hey @kaysonli did not you find any way how to get workable deserializeUser with CORS?
I've already tried sending withCredentials from FE, but without luck.
posted jaredhanson/passport#570