-
Notifications
You must be signed in to change notification settings - Fork 54
Log out old user when new user logs in #31
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
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Tests jupyterhub/ltiauthenticator#31 data8x has different 'courses' in EdX that create different 'users' in JupyterHub. This causes problems - if a user logs in from one course, they won't get logged into the *correct* course when they log in from another course! This would log them out of the last session when they log in as a new user. Ref #1725
Thanks a lot for this PR, @U4I-fedir-kryvytskyi! I've tested this with the help of @fqzbdkh, and it works! |
"Correct" behavior now since jupyterhub#31
tmpauthenticator is primarily used in binder-like cases. When a user hits /hub/tmplogin, we want them to get a fresh server. Currently, this could be accomplished with `force_new_server`, which tries to stop a running server (if any) before logging new user in. This has several problems: 1. Stopping servers might fail or take a long time. This shouldn't affect the ability to start new servers. 2. This doesn't work with named servers Instead, we log out the current user first before logging in a new user. This makes everything much faster & cleaner, at the cost of leaving the old user's server running. An idle-culler setup is expected to take care of that. This is the most common & expected behavior, and a break from the earlier defaults. Hence this is a breaking change, requiring a new major version bump. Inspired by jupyterhub/ltiauthenticator#31
This PR is an attempt to fix the existing issue that is described here:
#11
Also there is an existing opened PR for it
#16
But as far as I can see it is quite old, WIP and still opened
More in depth description:
JupyterHub does not set cookies for users after log in if they were previously already set. Which results in situation when attempt of new user to log in via /hub/lti/launch will be discarded if he previously was already logged in under different account