zinoubm commited on
Commit
8bff5a2
·
1 Parent(s): 12a0354

changin the urls from 127.0.0.1 to 0.0.0.0

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. main.py +6 -6
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://127.0.0.1:8000/auth_callback"
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://127.0.0.1:8000/auth_callback"
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
- uvicorn.run(
13
- f"app:app",
14
- port=8000,
15
- reload=True,
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
+ # )