passport-local icon indicating copy to clipboard operation
passport-local copied to clipboard

deserializeUser never called if cors() is used

Open kaysonli opened this issue 8 years ago • 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.

kaysonli avatar May 19 '16 02:05 kaysonli

:+1:

lyyourc avatar Jun 04 '16 06:06 lyyourc

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 https://github.com/jaredhanson/passport/issues/570

Marshevskyy avatar May 11 '17 20:05 Marshevskyy