Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated oauth2client with Google OAuth Library #683

Merged
merged 5 commits into from
Aug 22, 2024

Conversation

dgrieser
Copy link
Contributor

This is another attempt to remove the 7 day limit.
See: #634

Thanks to hramrach and his PR #677.

Changes

  1. oauth2client was completely replaced by google_auth_oauthlib
  2. By default, no browser is opened, but a local webserver will be started and must be accessible by a browser
  3. Options removed since they were part of oauth2client:
    • --noauth_local_webserver
    • --auth_host_name AUTH_HOST_NAME
    • --auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]
    • --logging_level

For security reasons Google removed the run_console() strategy from their Google OAuth library.
Currently there is no feasable way to not run a local web server using this library.
See: googleapis/google-auth-library-python-oauthlib@1391486

Workaround for headless systems

If you run gcalcli on a headless linux system, you can use a SSH tunnel to make the local web server, started by the OAuth flow, accessible:

ssh -L 8080:localhost:8080 <host>

@dbarnett
Copy link
Collaborator

I tried this out locally. It seemed to setup auth fine. I did notice that auth for the calm command seemed to be confusingly independent of auth for the list command, but it might've always been like that?

@dbarnett
Copy link
Collaborator

All looks good to me and seems to work well. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants