You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After using the https protocol, the local passport cannot be used, but the google and twitter strategies can be used. The local strategy does not run this function deserializeUser. In the callback function of the local strategy, req.session has passport information, but it does not exist after the jump There is no pasport information in the session
my code:
passport.serializeUser((user,done)=>{console.log("========serializeUser========\n",user)done(null,user);});passport.deserializeUser((user,done)=>{console.log("========deserializeUser========\n",user)done(null,user)});passport.use(newLocalStrategy({usernameField: 'email',passwordField: 'password'},asyncfunction(email,password,done){
........//database process}else{returndone(null,false,{message: 'Incorrect username and password'})}}));module.exports=passport
After using the https protocol, the local passport cannot be used, but the google and twitter strategies can be used. The local strategy does not run this function deserializeUser. In the callback function of the local strategy, req.session has passport information, but it does not exist after the jump There is no pasport information in the session
my code:
my route
** This function deserializeUser is not called **
please help me!
The text was updated successfully, but these errors were encountered: