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

[testing] login to github will redirect to a different URI #537

Closed
karlcow opened this issue Jan 15, 2015 · 2 comments
Closed

[testing] login to github will redirect to a different URI #537

karlcow opened this issue Jan 15, 2015 · 2 comments

Comments

@karlcow
Copy link
Member

karlcow commented Jan 15, 2015

Step to reproduce.

With a clean profile (not logged to github, not logged to webcompat.com)

  1. Starts your local instance python run.py
  2. Start a clean profile browser
  3. Enter http://127.0.0.1:5000/
  4. click on login
  5. The user is redirected to github Web site.
  6. login/password. Enter
  7. The user is redirected to http://localhost:5000/
  8. fix code.
  9. restart the server.
  10. Reenter http://127.0.0.1:5000/
  11. Try to login again.

It will not work a callback is happening. There's a 200 OK in the log but nothing else happened. The UI is not changed to logout and the avatar icon.

What I suspect is that http://127.0.0.1:5000/ != http://localhost:5000/

Suggestions:

  • Either having a way to redirect to the right localhost or 127.0.0.1 when started on one of these.
  • Either having the starting message of python run.py be localhost.
@miketaylr
Copy link
Member

We probably just need to document localhost instead of 127.0.0.1. GitHub requires us to put in the OAuth callback location "Authorization callback URL", which is set to http://localhost:5000/callback for our test application. But people could create their own test applications and use 127.0.0.1 if they want. It just needs to be consistent @ https://github.com/webcompat/webcompat.com/blob/master/config.py.example#L66 and in the application settings.

But maybe just telling people to use localhost is simplest. :)

@karlcow
Copy link
Member Author

karlcow commented Jan 15, 2015

Yes probably.

karlcow added a commit to karlcow/webcompat.com that referenced this issue Jan 15, 2015
karlcow added a commit to karlcow/webcompat.com that referenced this issue Jan 22, 2015
karlcow added a commit that referenced this issue Feb 28, 2015
karlcow added a commit that referenced this issue Feb 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants