Need help with configuring JupyerHub with globus auth

Hi All,

I am trying to setup a JupyterHub with Globus auth enabled. Meanwhile, I am having trouble setting up the correct configuration for the Globus Auth in the jupyterhub_config.py file. I have included my configuration as shown below.

Globus section

  1. c.OAuthenticator.authorize_url = “https:///auth.globus.org/v2/oauth2/authorize”
  2. c.OAuthenticator.token_url = “https:///auth.globus.org/v2/oauth2/token”
  3. c.OAuthenticator.userdata_url = “https:///auth.globus.org/v2/oauth2/userinfo”
  4. c.JupyterHub.authenticator_class = “globus”
  5. c.OAuthenticator.oauth_callback_url = “http:///127.0.0.1:8888/”
  6. c.OAuthenticator.client_id = “my_client_id”
  7. c.OAuthenticator.client_secret = “my_secret”
  8. c.GlobusOAuthenticator.logout_redirect_url = ‘https:///globus.org/logout’
  9. c.GlobusOAuthenticator.revoke_tokens_on_logout = False
  10. c.GlobusOAuthenticator.scope = [‘openid’, ‘profile’]
  11. c.GlobusOAuthenticator.exclude_tokens = [‘auth.globus.org’]

JupyterHub section

  1. c.JupyterHub.base_url = ‘/’
  2. c.JupyterHub.bind_url = ‘http:///127.0.0.1:8888’
  3. c.JupyterHub.hub_ip = ‘127.0.0.1’
  4. c.JupyterHub.hub_port = 8087
  5. c.ConfigurableHTTPProxy.api_url = ‘http:///127.0.0.1:5432’
  6. c.Spawner.default_url = ‘/lab’
  7. c.Spawner.ip = ‘127.0.0.1’
  8. c.Spawner.port = 8886
  9. c.Authenticator.auto_login = True

In my Globus account, I have registered an application with the redirects URL of 'http:///localhost:8888/redirect_uri". However, when I am done logging in to Globus, the redirection doesn’t seem to work and gives me an error of “Mismatching redirect URI.” Is there any configuration that I have not set up correctly or is missing? I appreciate the help from the community.

thanks in advance,
James

I think you have three / after https:, it should be two.

Its often the case that you need to register in your oauth2 provider (globus) where you allow users to be redirected after. Is what is allowed at the globus website what you request via this config? Otherwise, i expect that error message.

Thanks for the reply. To clarify the three “/”, since I have recently joined the community, I am not allowed to include more than two url, so adding those slash would avoid the post getting detected as a link. I have included the redirects url in my globas registered application as shown in the image below. However, I am still the same error message.

Globus registered application info:
globus registered application

Error page when authenticating:
I am getting error message stating “unable to fulfill you request, error processing oauth2 request, mismatching redirect URI.”

Best,
James

new updates, after adding an extra / at the end of my redirects on my globus registered app “http://127.0.0.1:8888/” seems to redirect me to jupyterhub, and resolved the issue of mismatching uri. However, is it possible to login to a new account if it’s their first time accessing the hub?

Best,
James