#5229·jupyterhub

Redirect to login form on failed XSRF token

Author: Jari27Created Dec 9, 2025Updated Feb 10, 2026
Labelsenhancement

Proposed change

Right now, if there's a mismatch with the XSRF token, the user sees an error message. The user then manually has to navigate back to the login page to get a new token assigned. This is annoying for users.

The proposed change is to automatically navigate the user back to the login page, where they will get a new token assigned.

Image

Alternative options

  1. Do nothing: worse user experience
  2. Automatic token refresh: too much effort

Who would use this feature?

Anybody who users JupyterHub and gets logged after a session expires and only logs in a few hours later.

(Optional): Suggest a solution

See above