From 1a74274dd8332da5ff46f1e58004c9dbf4677771 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Thu, 16 Dec 2021 16:38:39 +0100 Subject: [PATCH] Use URL from authenticator also for local authenticator This patch is related to the implementation of the MultiAuthenticator in jupyterhub/oauthenticator#459 The issue will be triggered when using more than one local provider or mixing with oauth providers. With multiple providers the template generates a set of buttons to choose from to continue the login process. For OAuth, the user will be sent to the provider login page and the redirect at the end will continue nicely the process. Now for the tricky part: using a local provider (e.g. PAM), the user will be redirected to the "same page" thus the same template will be rendered but this time to show the username/password dialog. This will trip the workflow because of the action URL coming from the settings and not from the authenticator. Therefore when the button is clicked, the user will come back to the original multiple choice page rather than continue the login. --- share/jupyterhub/templates/login.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/jupyterhub/templates/login.html b/share/jupyterhub/templates/login.html index 153a6c270e..173bd0057d 100644 --- a/share/jupyterhub/templates/login.html +++ b/share/jupyterhub/templates/login.html @@ -12,15 +12,17 @@
{% block login_container %} {% if custom_html %} +

This is a test

{{ custom_html | safe }} {% elif login_service %} +

This is with login_service

{% else %} -
+
Sign in