importHandlerfrom'passport-handler';importpassportfrom'passport';// passport strategy and others...app.get('/auth/callback',Handler(passport.authenticate('provider'),{error: (err,req,res,next)=>{console.log(err.message);next();},success: (req,res,next)=>{// if you don't add this function, next() will run automaticallyconsole.log('successful');next();}}));