GenericOAuthenticator doesnt redirect to the Identity server

Hi,
I have set up Jupyter Hub on Ubuntu 20.x
I have then used tljh-config to set up identity provider as below:

abc@def:~$ sudo tljh-config show
users:
  admin:
  - admin
user_environment:
  default_app: jupyterlab
https:
  enabled: true
  letsencrypt:
    email: ma@def.com
    domains:
    - xx.southeastasia.cloudapp.azure.com
auth:
  GenericOAuthenticator:
    client_id: f120eeee-b3c2-477c-9dd8-725879a5bbd7
    client_secret: xyz
    token_url: https://yy.azurewebsites.net/identity/connect/token
    userdata_url: https://yy.azurewebsites.net/identity/connect/userinfo
    username_key: preferred_username
    login_service: yy
    oauth_callback_url: https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback
  OAuthenticator:
    client_id: f120eeee-b3c2-477c-9dd8-725879a5bbd7
    client_secret: xyz
  type: oauthenticator.generic.GenericOAuthenticator
os:
  environ[OAUTH2_TOKEN_URL]: https://yy.azurewebsites.net/identity/connect/token
  environ[OAUTH2_USERDATA_URL]: https://yy.azurewebsites.net/identity/connect/userinfo
  environ[OAUTH2_AUTHORIZE_URL]: https://yy.azurewebsites.net/identity/connect/authorize

However, when I try to log in, it gives the following error before even redirecting to my Identity provider:

https://xx.southeastasia.cloudapp.azure.com/hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%xx.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=eyJzdGF0ZV9pZCI6ICJjYjM5ZjRlNjgzODU0ZDgyOWY0MjVmZDFiN2YwMTBmNyIsICJuZXh0X3VybCI6IG51bGx9
image

Is there something i have done wrong?

Can you try running JupyterHub with the default authenticator, and seeing whether everything works correctly?

Once you’ve tried that can you re-enable your Azure authenticator, and if you still have problems could you show us the debug logs from JupyterHub for the whole of the failed authentication process?

Thank you @manics for your reply.
Yes it works fine with default authenticator.
I’ll check how to get logs(i’m very new to this) and will try to get them.

Hi @manics , please find the log attached. You can see it keeps on redirecting and doesnt even redirect to the identity provider as set up in the config show at the start of this thread.

xadmin@xmaidesigner:~$ sudo journalctl -u jupyterhub -f
-- Logs begin at Fri 2021-08-13 03:54:56 UTC. --
Aug 20 09:26:47 xmaidesigner systemd[1]: Stopping jupyterhub.service...
Aug 20 09:26:47 xmaidesigner python3[733]: [C 2021-08-20 09:26:47.534 JupyterHub app:2941] Received signal SIGTERM, initiating shutdown...
Aug 20 09:26:47 xmaidesigner python3[733]: [I 2021-08-20 09:26:47.534 JupyterHub app:2577] Cleaning up 1 services...
Aug 20 09:26:47 xmaidesigner python3[733]: [I 2021-08-20 09:26:47.535 JupyterHub app:2589] Leaving single-user servers running
Aug 20 09:26:47 xmaidesigner python3[733]: [I 2021-08-20 09:26:47.535 JupyterHub app:2597] I didn't start the proxy, I can't clean it up
Aug 20 09:26:47 xmaidesigner python3[733]: [I 2021-08-20 09:26:47.535 JupyterHub app:2614] ...done
Aug 20 09:26:47 xmaidesigner systemd[1]: jupyterhub.service: Succeeded.
Aug 20 09:26:47 xmaidesigner systemd[1]: Stopped jupyterhub.service.
Aug 20 09:26:47 xmaidesigner systemd[1]: Started jupyterhub.service.
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.524 JupyterHub app:2463] Running JupyterHub version 1.4.0
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.524 JupyterHub app:2493] Using Authenticator: oauthenticator.generic.GenericOAuthenticator-0.10.0
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.524 JupyterHub app:2493] Using Spawner: traitlets.traitlets.UserCreatingSpawner-5.0.5
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.524 JupyterHub app:2493] Using Proxy: jupyterhub_traefik_proxy.toml.TraefikTomlProxy-0+unknown
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.534 JupyterHub app:1534] Loading cookie_secret from /opt/tljh/state/jupyterhub_cookie_secret
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.597 JupyterHub app:1838] Not using allowed_users. Any authenticated user will be allowed.
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.697 JupyterHub app:2530] Initialized 0 spawners in 0.005 seconds
Aug 20 09:26:48 xmaidesigner python3[22230]: [W 2021-08-20 09:26:48.699 JupyterHub app:2284] Deleting OAuth client jupyterhub-user-xadmin
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.727 JupyterHub app:2742] Not starting proxy
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.728 JupyterHub app:2778] Hub API listening on http://127.0.0.1:15001/hub/
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.729 JupyterHub app:2793] Starting managed service cull-idle
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.730 JupyterHub service:339] Starting service 'cull-idle': ['/opt/tljh/hub/bin/python3', '-m', 'jupyterhub_idle_culler', '--timeout=600', '--cull-every=60', '--concurrency=5', '--max-age=0']
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.731 JupyterHub service:121] Spawning /opt/tljh/hub/bin/python3 -m jupyterhub_idle_culler --timeout=600 --cull-every=60 --concurrency=5 --max-age=0
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.735 JupyterHub proxy:340] Checking routes
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.736 JupyterHub app:2853] JupyterHub is now running at http://:8000
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.743 JupyterHub log:189] 200 GET /hub/api (@127.0.0.1) 2.16ms
Aug 20 09:26:48 xmaidesigner python3[22230]: [I 2021-08-20 09:26:48.909 JupyterHub log:189] 200 GET /hub/api/users (cull-idle@127.0.0.1) 34.36ms
Aug 20 09:26:59 xmaidesigner python3[22230]: [I 2021-08-20 09:26:59.366 JupyterHub log:189] 302 GET / -> /hub/ (@115.70.35.46) 0.80ms
Aug 20 09:26:59 xmaidesigner python3[22230]: [I 2021-08-20 09:26:59.465 JupyterHub log:189] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@115.70.35.46) 0.78ms
Aug 20 09:26:59 xmaidesigner python3[22230]: [I 2021-08-20 09:26:59.594 JupyterHub log:189] 200 GET /hub/login?next=%2Fhub%2F (@115.70.35.46) 30.91ms
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.125 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.127 JupyterHub log:189] 302 GET /hub/oauth_login?next=%2Fhub%2F -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.83ms
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.233 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.234 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.32ms
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.649 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.651 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.56ms
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.750 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.751 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.46ms
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.851 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.852 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.34ms
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.951 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:06 xmaidesigner python3[22230]: [I 2021-08-20 09:27:06.952 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.71ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.052 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.054 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.61ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.153 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.155 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.68ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.260 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.261 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.64ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.360 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.361 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.52ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.461 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.462 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.52ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.561 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.563 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 2.25ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.665 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.666 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.47ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.770 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.771 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.39ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.872 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.873 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.60ms
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.972 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:07 xmaidesigner python3[22230]: [I 2021-08-20 09:27:07.973 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.39ms
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.073 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.074 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.39ms
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.174 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.176 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.76ms
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.277 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.278 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.24ms
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.377 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:08 xmaidesigner python3[22230]: [I 2021-08-20 09:27:08.378 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.11ms
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.537 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.538 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.53ms
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.637 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.638 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.22ms
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.762 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.764 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.65ms
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.862 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.863 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.62ms
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.963 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:09 xmaidesigner python3[22230]: [I 2021-08-20 09:27:09.963 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.26ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.063 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.064 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.43ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.163 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.164 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.62ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.266 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.267 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.36ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.367 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.367 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.33ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.469 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.470 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.42ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.573 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.574 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.38ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.672 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.673 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.14ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.774 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.776 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.80ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.876 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.877 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.47ms
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.980 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:10 xmaidesigner python3[22230]: [I 2021-08-20 09:27:10.982 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 2.59ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.084 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.085 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.76ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.198 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.199 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.21ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.300 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.301 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.19ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.401 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.402 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.44ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.501 JupyterHub oauth2:100] OAuth redirect: 'https://xx.southeastasia.cloudapp.azure.com/hub/oauth_callback'
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.502 JupyterHub log:189] 302 GET /hub/oauth_login?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] -> ?response_type=code&redirect_uri=https%3A%2F%2Fxmaidesigner.southeastasia.cloudapp.azure.com%2Fhub%2Foauth_callback&client_id=f120eeee-b3c2-477c-9dd8-725879a5bbd7&state=[secret] (@115.70.35.46) 1.41ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.871 JupyterHub log:189] 302 GET / -> /hub/ (@115.70.35.46) 0.87ms
Aug 20 09:27:11 xmaidesigner python3[22230]: [I 2021-08-20 09:27:11.971 JupyterHub log:189] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@115.70.35.46) 0.90ms
Aug 20 09:27:36 xmaidesigner python3[22230]: [I 2021-08-20 09:27:36.997 JupyterHub log:189] 302 GET / -> /hub/ (@92.118.161.33) 0.85ms
Aug 20 09:27:37 xmaidesigner python3[22230]: [I 2021-08-20 09:27:37.879 JupyterHub log:189] 302 GET /hub/ -> /hub/login?next=%2Fhub%2F (@92.118.161.33) 0.71ms
Aug 20 09:27:38 xmaidesigner python3[22230]: [I 2021-08-20 09:27:38.770 JupyterHub log:189] 200 GET /hub/login?next=%2Fhub%2F (@92.118.161.33) 1.86ms

Could you try turning on debug logging? That will hopefully show the internal requests JupyterHub makes to the authentication provider.

@manics Can you help me with some instructions on how I can get these debug logs? I have so far not been successful.
I have tried sudo journalctl -u jupyterhub -f

solved using GenericOAuthenticator doesnt redirect to the Identity server · Issue #452 · jupyterhub/oauthenticator · GitHub