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

Bad OAuth state in cookie #2

Open
betatim opened this issue Jan 23, 2018 · 2 comments
Open

Bad OAuth state in cookie #2

betatim opened this issue Jan 23, 2018 · 2 comments

Comments

@betatim
Copy link
Member

betatim commented Jan 23, 2018

oauth-state-missing

Sometimes this happens when people try to login. Seems to be hard to reproduce. Some kind of race condition or trying to login twice at the same time maybe.

Min says that the cookie is set before the redirect and then deleted after successful login. This means if two logins are happening at the same time you could end up with the second one failing.

@BenjaminHCCarr
Copy link

I was greeted with:
You have successfully joined the project "Personal Data Notebooks".
On signing into OH.

Popped over to https://notebooks.openhumans.org/hub/home

Server would launch: https://notebooks.openhumans.org/hub/user/{user}/

Then I would get the error:

500 : Internal Server Error
Failed to start your server. Please contact admin.

You can try restarting your server from the home page.

I was able to mitigate this error based on @betatim suggestion to clear cookies:
notebooks.openhumans.org had one cookie jupyter-hub-token
Deleting this cookie fixed the problem.

@betatim
Copy link
Member Author

betatim commented Feb 20, 2018

For archaeology purposes: I can reproduce this locally if I visit http://localhost:8000 then click login, OH redirects me back but to http://127.0.0.1:8000. This means that the hub can't read the cookie it set just before the redirect (because it is on a different domain).

Not sure how this happens in the production setup. Maybe HTTPS vs HTTP??

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