mxstbr / passport-magic-login

Passwordless authentication with magic links for Passport.js.
MIT License
664 stars 45 forks source link

Allow POST for verification via req.body #19

Closed eric-burel closed 1 year ago

eric-burel commented 2 years ago

Currently we need to use some query params to pass the token, but it feels more elegant to have: { token: "token I got from the URL", somePayloadItem: "foobar" }

This is especially useful when you have an intermediate UI to check the token, in my case I have a "check" page that will manually send a query to the verification callback and pass the token. I need to construct the URL with a query param while I'd rather send a POST request as we already do to send the email.