vinialbano / passport-magic-link

Magic Link authentication for Passport JS
MIT License
60 stars 9 forks source link

No way to execute passport.authenticate callback with requestToken action #18

Open ShqipognjaLL opened 1 year ago

ShqipognjaLL commented 1 year ago

static sendLink(req, res, next){ passport.authenticate('magiclink', { action : 'requestToken' }, (token) => { res.send(token) })(req, res, next); res.send({link: req.link}); }

It appears that the verify function doesn't have a "done" like local strat and also does not call the authenticate callback function. This makes it impossible to send a response with the token or the link.