Spaces:
Runtime error
Runtime error
changin the urls from 127.0.0.1 to 0.0.0.0
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ async def integrate_google(request: Request):
|
|
| 40 |
flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
|
| 41 |
"credentials.json", scopes=SCOPES
|
| 42 |
)
|
| 43 |
-
flow.redirect_uri = "http://
|
| 44 |
authorization_url, state = flow.authorization_url(
|
| 45 |
access_type="offline",
|
| 46 |
include_granted_scopes="true",
|
|
@@ -56,7 +56,7 @@ async def auth_callback(request: Request):
|
|
| 56 |
flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
|
| 57 |
"credentials.json", scopes=SCOPES, state=state
|
| 58 |
)
|
| 59 |
-
flow.redirect_uri = "http://
|
| 60 |
|
| 61 |
# Use the authorization server's response to fetch the OAuth 2.0 tokens.
|
| 62 |
authorization_response = str(request.url)
|
|
|
|
| 40 |
flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
|
| 41 |
"credentials.json", scopes=SCOPES
|
| 42 |
)
|
| 43 |
+
flow.redirect_uri = "http://0.0.0.0:8000/auth_callback"
|
| 44 |
authorization_url, state = flow.authorization_url(
|
| 45 |
access_type="offline",
|
| 46 |
include_granted_scopes="true",
|
|
|
|
| 56 |
flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
|
| 57 |
"credentials.json", scopes=SCOPES, state=state
|
| 58 |
)
|
| 59 |
+
flow.redirect_uri = "http://0.0.0.0:8000/auth_callback"
|
| 60 |
|
| 61 |
# Use the authorization server's response to fetch the OAuth 2.0 tokens.
|
| 62 |
authorization_response = str(request.url)
|
main.py
CHANGED
|
@@ -8,9 +8,9 @@ os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = "1"
|
|
| 8 |
app = app
|
| 9 |
|
| 10 |
# use this for local development
|
| 11 |
-
if __name__ == "__main__":
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 8 |
app = app
|
| 9 |
|
| 10 |
# use this for local development
|
| 11 |
+
# if __name__ == "__main__":
|
| 12 |
+
# uvicorn.run(
|
| 13 |
+
# f"app:app",
|
| 14 |
+
# port=8000,
|
| 15 |
+
# reload=True,
|
| 16 |
+
# )
|