Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- passport.deserializeUser(async function(id, done){
- try{
- const user = await User.findById(id);
- if(!user)
- throw new Error("User session not found")
- done(null, user)
- }catch(e){
- done(e)
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement