Skip to content

Blocked by Google OAuth2 #5

@arunachal1

Description

@arunachal1

I have configured google cloud, can see client_secrets.json, config.json with correct details (authuser, redirect urls, etc) in ~/.config/colab-cli/. But running colab-cli open-nb code.ipynb gives:

/home/arunachal/.local/lib/python3.10/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /home/arunachal/.config/colab-cli/mycreds.txt: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?client_id=<xyz>lp4.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&access_type=offline&response_type=code

Clicking leads to this from google

Image

Clicking further gives:

Error 400: redirect_uri_mismatch

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cloud Console. Request details: redirect_uri=http://localhost:8080/ flowName=GeneralOAuthFlow

For reference,

My client_Secrets looks like:

{"web":{"client_id":apps.googleusercontent.com","project_id":"","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"","redirect_uris":["http://localhost:8080"],"javascript_origins":["http://localhost:8080"]}}

config.json bears correct authuserid {"auth_user_id": "0"} as evident from this browser link: https://mail.google.com/accounts/SetOSID?authuser=0&continue=https://mail.google.com/mail/u/0/?pli%..

Is this because Google now considers this mode of access insecure? Also unsure about this: mycreds.txt: No such file or directory. Will appreciate any help. This is a very useful, basic application, which deserves wider attention!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions