Skip to content

Commit

Permalink
Use URL from authenticator also for local authenticator
Browse files Browse the repository at this point in the history
This patch is related to the implementation of the
MultiAuthenticator in jupyterhub/oauthenticator#459

The issue will be triggerd when mixing local and 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.
  • Loading branch information
sgaist committed Dec 16, 2021
1 parent 92c6a23 commit b21e6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/jupyterhub/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</a>
</div>
{% else %}
<form action="{{login_url}}?next={{next}}" method="post" role="form">
<form action="{{authenticator_login_url}}?next={{next}}" method="post" role="form">
<div class="auth-form-header">
Sign in
</div>
Expand Down

0 comments on commit b21e6db

Please sign in to comment.