pygsheets icon indicating copy to clipboard operation
pygsheets copied to clipboard

Google is deprecating the OOB Oauth2 workflow

Open jtroo opened this issue 2 years ago • 4 comments

See: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob

I believe this is the auth method used by pygsheets, so this will need to be changed to continue working into the future.

jtroo avatar May 04 '22 04:05 jtroo

If you are just working locally then you should set local=True in authorize, the run_local_server method is the replacement method. Now you will need to use the browser pop up to authorize pygsheets.

see https://github.com/nithinmurali/pygsheets/blob/staging/pygsheets/authorization.py#L45 for the internal code flow This else is deprecated

If you are working on a remote machine without browser access... I'm not sure what you should do but this thread seems to have some clues: https://github.com/r-lib/gargle/issues/202

danpf avatar May 17 '22 18:05 danpf

Note for anyone having trouble with their migration from oob.

Once you changed your local credential, if you have the error deleted_client: The OAuth client was deleted. Delete the local file named sheets.googleapis.com-python.json

jon-trust avatar Jun 06 '22 06:06 jon-trust

Thanks for the pointers. After running an interactive auth flow using pygsheets.authorize(local=True) the sheets.googleapis.com-python.json was generated in the current working directory. That file can be used in subsequent (including headless) auth flows.

cdibble avatar Jul 08 '22 23:07 cdibble

I believe Google has now deprecated the auth method that Pygsheet uses and now I believe that Pygsheets doesn't work.

RinUnderscore avatar Jan 06 '23 21:01 RinUnderscore