jaredhanson / passport-openid

OpenID authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-openid/?utm_source=github&utm_medium=referral&utm_campaign=passport-openid&utm_content=about
MIT License
98 stars 85 forks source link

Fix for false "internal error" message in Browser #16

Open dpolivaev opened 11 years ago

dpolivaev commented 11 years ago

Hello,

the issue already described in https://github.com/jaredhanson/passport-google/issues/3 unfortunately occurs in vanilla openid apps too. So if I run your example and enter a wrong URL in the login field like this login I get an error stack trace displayed in the browser. afterLogin The reason for this behavior is that the strategy interpretes a wrong URL as internal error although it can actually be entered by a user. After applying the suggested fix the wrong input results in a redirect back to the login page which I think is a correct behavior. Please check this issue, it is a show stopper.

Kind regards, Dimitry

rajgitter commented 11 years ago

if i change from self.error to self.fail, and if i provide a bad openid url passport is not redirecting to failureRedirect url.

rwky commented 6 years ago

@dpolivaev can you please make a PR against https://github.com/passport-next/passport-openid and it'll get looked into.