I’m trying to log out a user of all his sessions programmatically using the JupyterHub api. For the moment I can log out a user out of all his server sessions by deleting his oauth tokens by using [DEL] /users/{name}/tokens/{token_id}.
The thing I don’t know is how I can log the user out of /hub. How do I reproduce the behavior of when a user clicks on logout on his home page, using the api?
Logging users out of the Hub itself isn’t currently possible via the API, but it could be. Resetting the user’s cookie ID in the database invalidates all browser credentials, but there’s no API for that yet.