question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Google Authenticator does not use client id from config only env

See original GitHub issue

Putting the setting c.GoogleOAuthAuthenticator.client_id = '...' in the JupyterHub config file results in a redirect to https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=https%3A%2F%2Fexample.com%3A8000%2Fhub%2Foauth_callback&client_id=&response_type=code&state=[secret]&scope=openid+email when logging in. Notice that the client_id is empty. Google properly says something went wrong and that no client ID is provided.

However, if the environmental variable is used instead like

OAUTH_CLIENT_ID=... jupyterhub

Then it works just fine. All other settings are still in config file.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
coderforlifecommented, Sep 17, 2018

Okay, so this turned out to be an issue of mine and mine alone. I misspelled GoogleOAuthenticator… I think I need to submit a feature request to traitlets for a warning in debug mode that mentions un-used values or bad names of things…

0reactions
betatimcommented, Sep 18, 2018

No worries. Glad you figured it out 😃

An option in traitlets to warn about unconsumed or likely to be mispelt names would be nice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authenticate with a backend server - Google Developers
A modified client application can send arbitrary user IDs to your server to impersonate users, so you must instead use verifiable ID tokens...
Read more >
Google OAuth 2.0 failing with Error 400: invalid_request for ...
The solution Google adopted in gcloud is to run a local server on the same machine as the user's browser and then have...
Read more >
Authenticate to Cloud services using client libraries
This page describes how you can use client libraries and Application Default Credentials to access Google APIs. Client libraries make it easier to...
Read more >
How to Set Up the New Google Auth in a React and Express ...
The first step to take in order to implement Google authentication is to generate a client ID and secret for the application you're...
Read more >
Google authentication types for R
To avoid keeping track of which client_id/secret to use, Google offers a client ID JSON file you can download from the Google Cloud...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found