mirror of
https://github.com/run-llama/llama-hub.git
synced 2025-11-09 14:24:08 +00:00
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/`
This commit is contained in:
parent
87dd8721db
commit
11bf404b7f
@ -88,7 +88,7 @@ class GoogleDocsReader(BaseReader):
|
|||||||
flow = InstalledAppFlow.from_client_secrets_file(
|
flow = InstalledAppFlow.from_client_secrets_file(
|
||||||
"credentials.json", SCOPES
|
"credentials.json", SCOPES
|
||||||
)
|
)
|
||||||
creds = flow.run_local_server(port=0)
|
creds = flow.run_local_server(port=8080)
|
||||||
# Save the credentials for the next run
|
# Save the credentials for the next run
|
||||||
with open("token.json", "w") as token:
|
with open("token.json", "w") as token:
|
||||||
token.write(creds.to_json())
|
token.write(creds.to_json())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user