aup-learning-cloud icon indicating copy to clipboard operation
aup-learning-cloud copied to clipboard

Failed native login shows “Sign in with Native” on left panel instead of preserving multi-auth login layout

Open mariodruiz opened this issue 5 months ago • 0 comments

Summary

In authMode: multi, the main login page (/hub/login) correctly shows GitHub + local account on the right. After a failed native login (POST /hub/native/login), the page reloads and the left panel shows a “Sign in with Native” button. That’s confusing and looks like a broken/different login flow.

Environment

• Auth mode: multi (GitHub App + native) • URL: e.g. https://dub.aupcloud.io/hub/login • Native login endpoint: /hub/native/login

Steps to reproduce

  1. Open /hub/login (multi-auth layout: AMD branding left, GitHub + local form right).
  2. Under Or use local account, enter invalid username/password.
  3. Submit.

Expected behavior

• Stay on the same multi-auth layout • Show a clear error (e.g. “Invalid credentials”) above the local account form • Keep GitHub and local account options visible • No new “Sign in with Native” button on the left

Actual behavior

• Page reloads after failed native login • Left panel shows “Sign in with Native” (driven by login_service = "Native") • Layout feels like it switched from multi-auth landing page to single-authenticator error page • Users may think native login is broken or they’re on the wrong page

Root cause

Custom template runtime/hub/frontend/templates/login.html:

• Left panel (lines 93–98): renders Sign in with {{ login_service }} whenever JupyterHub sets login_service on failed auth. • Native authenticator sets login_service = "Native" in runtime/hub/core/authenticators/firstuse.py. • On failed /hub/native/login, JupyterHub re-renders with that sub-authenticator context, so the left button appears even though authenticator_mode is still multi and the full form is already on the right.

mariodruiz avatar Jun 18 '26 13:06 mariodruiz