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
Hello, I am using the passport-local-strategy and the google auth strategy, but I need to do 2 different serializers and deserializer, how can I do that, how can I detect if the strategy chosen is local or google?
This is what i am tring to do
`passport.serializeUser(function(user, done) {
if(// This is Local Strategy){
User.serializeUser();
}
else{
done(null, user);
}
});
`
passport.deserializeUser(function(user,id, done) {
if(// This is Local Strategy){
This discussion was converted from issue #770 on June 18, 2021 23:19.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I am using the passport-local-strategy and the google auth strategy, but I need to do 2 different serializers and deserializer, how can I do that, how can I detect if the strategy chosen is local or google?
This is what i am tring to do
`passport.serializeUser(function(user, done) {
if(// This is Local Strategy){
});
`
passport.deserializeUser(function(user,id, done) {
if(// This is Local Strategy){
}
else{
});
Beta Was this translation helpful? Give feedback.
All reactions