Closed SuperstrongBE closed 1 year ago
Check our open source setup at Devographics: https://github.com/Devographics/Monorepo/tree/61b0a929a89d8cbce93c56ee265ffd0cf4b5899d/surveyform/src/pages/api/account/magic-login
You passed a middleware with no "next" function I think
Hello i'm try to use passport-magic-login in a nextJS application.
in my call back i have this
export default async function handler(req: NextApiRequest, res: NextApiResponse) { passport.authenticate('magiclogin',async (err:any, payload:any) => { // ... doing auth stuff res.redirect('/test') })(req,res) }
But it throw an 500 error with
next is not a function
.