From 11bf404b7f73e94b54a32bcceb7394537e360401 Mon Sep 17 00:00:00 2001 From: reletreby <83604672+reletreby@users.noreply.github.com> Date: Fri, 10 Mar 2023 09:20:11 -0500 Subject: [PATCH] Update base.py When the port is set to `0`, the URI is randomized every time the code is used. This makes it difficult to register a specific URI with `OAuth 2.0 Client`. Fixing the port resolves this. You can now add the following to `Authorized redirect URIs`: `http://localhost:8080/` --- loader_hub/google_docs/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader_hub/google_docs/base.py b/loader_hub/google_docs/base.py index 75e5fa67..d5d48266 100644 --- a/loader_hub/google_docs/base.py +++ b/loader_hub/google_docs/base.py @@ -88,7 +88,7 @@ class GoogleDocsReader(BaseReader): flow = InstalledAppFlow.from_client_secrets_file( "credentials.json", SCOPES ) - creds = flow.run_local_server(port=0) + creds = flow.run_local_server(port=8080) # Save the credentials for the next run with open("token.json", "w") as token: token.write(creds.to_json())