nithinmurali / pygsheets

Google Sheets Python API v4
https://pygsheets.readthedocs.io/en/latest
Other
1.51k stars 220 forks source link

`google.oauth2` both Deprecated and Decommissioned #584

Open chtompki opened 1 year ago

chtompki commented 1 year ago

Google authentication using:

flow = Flow.from_client_secrets_file(client_secret_file, scopes=scopes,
                                                 redirect_uri='urn:ietf:wg:oauth:2.0:oob')
            auth_url, _ = flow.authorization_url(prompt='consent')

            print('Please go to this URL and finish the authentication flow: {}'.format(auth_url))
            code = input('Enter the authorization code: ')
            flow.fetch_token(code=code)
            credentials = flow.credentials

simply just doesn't work. I'm working on a fix for you using the now suggested google-auth library.

chtompki commented 1 year ago

Trying to follow what's going on here: https://github.com/googleapis/google-auth-library-python-oauthlib/pull/264

chtompki commented 1 year ago

If we upversion to google-auth-library-python-oauthlib@v1.0.0 we might be able to get it to work, though I can't figure it quite out.