ValueError: oauth_client_id cannot be empty when using HubOAuth with flask service

Hello everyone.

I currently have an external flask service which interacts with Jhub. I am using Oauth with flask (Flask-oidc) as well as Jhub. I realized I can remove flask OIDC altogether if I use Jhub to authenticate user. So I followed this example. I added this code to my existing flask app which is registered in config.yaml. I am setting JUPYTERHUB_SERVICE_PREFIX and JUPYTERHUB_API_TOKEN in my app.

But I am getting ValueError: oauth_client_id cannot be empty when tried using HubOAuth with flask service.

Is there something I am missing? I looked for similar errors on Stack Overflow or on older Github discussions, it seems it should be resolved in new version of Z2JH.

Any guidance on this will be really appreciated. Thanks.

I fixed this by setting Client ID ENV var. Now I get different error saying client_id invalid. Which is kind of misleading cause I have confirmed client ID at all the places. Will try to resolve that issue.