Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reddit strategy doesn't redirect to failure URL on declined auth request #33

Closed
vitosamson opened this issue Jul 12, 2017 · 4 comments
Closed

Comments

@vitosamson
Copy link
Contributor

To reproduce:

  1. Go to https://login-with.com/login
  2. Login with Reddit
  3. Hit the "decline" button on the reddit auth request page

You'll get redirected to https://auth.login-with.com/reddit/callback with {"error":null,"user":false}

This is happening because in routes.js here, both error and user are falsy and so it falls through to the res.json at the end.

A solution here would probably be to change line 34 to if (error || !user) - would you accept a PR for that? I'm not sure if this is happening for other providers, I've only tested with reddit.

@lipp
Copy link
Owner

lipp commented Jul 12, 2017

👍 Sure, PR is very welcomed! I think if (error || !user) totally makes sense. Should have a meaningful error of course...

@vitosamson
Copy link
Contributor Author

#34

@lipp lipp closed this as completed in #34 Jul 13, 2017
@vitosamson
Copy link
Contributor Author

Hey, any chance we can get a version bump and updated docker image pushed out with this?

@lipp
Copy link
Owner

lipp commented Jul 19, 2017

Sure... tomorrow... promise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants