mxstbr / passport-magic-login

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

fix: Decoding errors not reported to Passport resulting in 500 error instead of 401 #25

Closed ramrami closed 1 year ago

ramrami commented 1 year ago

When the decodeToken function throws an error (because the token is invalid or missing), that error is not reported to Passport with self.fail, this results in uncaught or 500 errors instead of the expected 401

mxstbr commented 1 year ago

Published in v1.2.1!

ramrami commented 1 year ago

Awesome! Thank you