iterative / iterative/PyDrive2

Confirm OAuth OOB and Implement Temporary Workaround

Aperta
#231 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature request priority-p1
Lingua principale
Python
Stelle
670
Fork
75
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This morning (Sept 12) a PyDrive reliant script of ours failed. The full stacktrace is below. The script ran successfully last week, and there have been no changes to the configuration on our end. I think this is due to Google's impending removal of support for OAuth Out-of-Band flow.

Google's [migration docs](https://developers.google.com/identity/protocols/oauth2/resources/oob-migration) indicate that users can
>Add an ack_oob_shutdown parameter with a value of the enforcement date: 2022-10-03 to your redirect flow request. Example: `ack_oob_shutdown=2022-10-03`

The [Migrating to Google Auth Library](https://github.com/iterative/PyDrive2/pull/221) PR is open. If it will not be merged in short order, I suggest implementing the temporary workaround.

#### Stacktrace
```
Traceback (most recent call last):
...
File "/Users/.../lib/python3.8/site-packages/pydrive2/files.py", line 512, in Upload
self._FilesInsert(param=param)
File "/Users/.../lib/python3.8/site-packages/pydrive2/auth.py", line 84, in _decorated
return decoratee(self, *args, **kwargs)
File "/Users/.../lib/python3.8/site-packages/pydrive2/files.py", line 683, in _FilesInsert
raise ApiRequestError(error)
pydrive2.files.ApiRequestError:
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start with the OAuth flow involved before the calls shown in pydrive2/files.py lines 512 and 683, and the decorator in pydrive2/auth.py line 84. Compare that flow with Google's OOB migration documentation and the referenced PyDrive2 pull request; done means the temporary workaround decision is confirmed and the affected script no longer fails under the stated OAuth change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
google-cloud, python
Ambito
api, authentication
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.