jaredhanson / passport-local

Username and password authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-local/?utm_source=github&utm_medium=referral&utm_campaign=passport-local&utm_content=about
MIT License
2.73k stars 498 forks source link

deserializeUser never called if cors() is used #135

Open kaysonli opened 8 years ago

kaysonli commented 8 years ago

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.

lyyourc commented 8 years ago

:+1:

Marshevskyy commented 7 years ago

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