Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Out-of-band consent flow error #73

Closed
rossmeyerza opened this issue Oct 11, 2022 · 1 comment
Closed

Out-of-band consent flow error #73

rossmeyerza opened this issue Oct 11, 2022 · 1 comment

Comments

@rossmeyerza
Copy link

Getting an out-of-band app blocked when using the command line tools authorisation flow:

image

Error link directs to the OOB Flow Migration guide: https://developers.google.com/identity/protocols/oauth2/resources/oob-migration. Looks like it needs to be updated to use the Loopback IP address flow for desktop app when installing/deploying via the commanline tools: https://developers.google.com/identity/protocols/oauth2/resources/loopback-migration

@rossmeyerza
Copy link
Author

rossmeyerza commented Oct 14, 2022

Found the issue. Out-of-bands auth flow is deprecated as 03 Oct '22 and needs to be replaced with loopback method (Local webserver). Should probably do a pull request but if anyone needs further info:

Starthinker/util/auth_wrapper.py

--- a/starthinker/util/auth_wrapper.py
+++ b/starthinker/util/auth_wrapper.py
@@ -129,7 +129,11 @@ class CredentialsUserWrapper(CredentialsUser):
 
   def load_flow(self):
     flow = CredentialsFlowWrapper(self.client)
-    flow.run_console()
+    credentials = flow.run_local_server(host='localhost',
+      port=8080, 
+      authorization_prompt_message='Please visit this URL: {url}', 
+      success_message='The auth flow is complete; you may close this window.',
+      open_browser=True)
 
     self.from_credentials(flow.credentials)
     self.save()

Which fixed it for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant