You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using OAUTH2_AUTHORIZE_URL seems to improperly construct the authorize URL used in the login process. It seems to prepend the base URL (in my case, localhost:8000/hub/) to the actual authorize URL, resulting in a 404 not found.
When setting directly through Jupyter config file, as c.GenericOAuthenticator.authorize_url = "https://acme.okta.com/oauth2/<redacted>/v1/authorize?scope=openid email
it works as expected and I am redirected to my Okta OAuth provider as expected.
Expected behaviour
Using OAUTH2_AUTHORIZE_URL should not concatenate the base URL to the authorize endpoint. It should behave the same way as the Jupyterhub c.GenericOAuthenticator.authorize_url parameter
Example
When set with OAUTH2_AUTHORIZE_URL environment variable, after clicking the sign in with my provider link from Jupyterhub I get directed to this URL, which results in a 404 with Jupyterhub since this URL doesn't exist http://localhost:8000/hub/%22https://acme.okta.com/oauth2/<redacted>/v1/authorize?scop.....
^ Removing the base url manually completes the sign in process
But when I use the parameter through Jupyterhubs config it works as expected https://acme.okta.com/oauth2/<redacted>/v1/authorize?scop.....
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Welcome to the Jupyter community! 🎉
consideRatio
changed the title
Using OAUTH2_AUTHORIZE_URL with GenericOAuthenticator results in incorrect authorize URL
[Generic] Using OAUTH2_AUTHORIZE_URL results in incorrect authorize URL
Apr 1, 2023
Bug description
Using
OAUTH2_AUTHORIZE_URL
seems to improperly construct the authorize URL used in the login process. It seems to prepend the base URL (in my case,localhost:8000/hub/
) to the actual authorize URL, resulting in a 404 not found.When setting directly through Jupyter config file, as
c.GenericOAuthenticator.authorize_url = "https://acme.okta.com/oauth2/<redacted>/v1/authorize?scope=openid email
it works as expected and I am redirected to my Okta OAuth provider as expected.
Expected behaviour
Using
OAUTH2_AUTHORIZE_URL
should not concatenate the base URL to the authorize endpoint. It should behave the same way as theJupyterhub c.GenericOAuthenticator.authorize_url
parameterExample
When set with
OAUTH2_AUTHORIZE_URL
environment variable, after clicking the sign in with my provider link from Jupyterhub I get directed to this URL, which results in a 404 with Jupyterhub since this URL doesn't existhttp://localhost:8000/hub/%22https://acme.okta.com/oauth2/<redacted>/v1/authorize?scop.....
^ Removing the base url manually completes the sign in process
But when I use the parameter through Jupyterhubs config it works as expected
https://acme.okta.com/oauth2/<redacted>/v1/authorize?scop.....
Setup
Python 3.8.13
jupyterhub 2.3.1
jupyterlab 3.4.4
amazonlinux:2 container
The text was updated successfully, but these errors were encountered: