Skip to content

Commit

Permalink
Disable OAuth OOB flow due to Google deprecation
Browse files Browse the repository at this point in the history
- Old projects will work with OOB flow, but new ones won't work due to new policy made by Google
- OOB flow will be depecrated for exisiting clients on October 3, 2022
- Source: https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#disallowed-oob
  • Loading branch information
l3v11 committed Mar 17, 2022
1 parent 616a4fe commit 3ee5a2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dtoken.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
else:
flow = InstalledAppFlow.from_client_secrets_file(
'credentials.json', __OAUTH_SCOPE)
credentials = flow.run_console(port=0)
credentials = flow.run_local_server(port=0)

creds = credentials.to_json()
# Save the credentials for the next run
Expand Down
4 changes: 2 additions & 2 deletions gen_sa.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def serviceaccountfactory(
else:
flow = InstalledAppFlow.from_client_secrets_file(credentials, SCOPES)

# creds = flow.run_local_server(port=0)
creds = flow.run_console()
creds = flow.run_local_server(port=0)
# creds = flow.run_console()

with open(token, 'wb') as t:
pickle.dump(creds, t)
Expand Down

0 comments on commit 3ee5a2b

Please sign in to comment.