VannTen / oauth2token

GNU General Public License v3.0
8 stars 2 forks source link

Broken with newer `google-auth-oauthlib` releases #6

Closed BrunoMSantos closed 1 year ago

BrunoMSantos commented 2 years ago

Getting this error with google-auth-oauthlib v0.7.1.

  File "/usr/bin/oauth2get", line 5, in <module>
    from oauth2token.token_mgmt import get_token
  File "/usr/lib/python3.10/site-packages/oauth2token/token_mgmt.py", line 3, in <module>
    from google_auth_oauthlib.flow import InstalledAppFlow
  File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/__init__.py", line 21, in <module>
    from .interactive import get_user_credentials
  File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/interactive.py", line 27, in <module>
    import google_auth_oauthlib.flow
  File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/flow.py", line 69, in <module>
    import google_auth_oauthlib.helpers
  File "/usr/lib/python3.10/site-packages/google_auth_oauthlib/helpers.py", line 27, in <module>
    from google.auth import external_account_authorized_user
ImportError: cannot import name 'external_account_authorized_user' from 'google.auth' (/usr/lib/python3.10/site-packages/google/auth/__init__.py)

I can still use it by rolling back google-auth-oauthlib to v0.5.2. I didn't test intermediate versions, but I could find indications that the problem exists since v0.6. E.g.: https://stackoverflow.com/questions/74189694/cannot-import-name-external-account-authorized-user-from-google-auth

BrunoMSantos commented 1 year ago

Cannot reproduce for a while now. Seems the issue was in google-auth-oauthlib.