jupyterhub / tmpauthenticator

JupyterHub authenticator that hands out temporary accounts for everyone. For use in tmpnb.org
BSD 3-Clause "New" or "Revised" License
22 stars 18 forks source link

BREAKING: Logout current user when new user logs in (removes `force_new_server`) #22

Closed yuvipanda closed 1 year ago

yuvipanda commented 3 years ago

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 https://github.com/jupyterhub/ltiauthenticator/pull/31

TODO: