Jose Martin Rangel Espinoza commited on
Commit
07d3e6c
·
1 Parent(s): d62a8d8

🔧 Update authentication flow to enforce manual redirect URI for OAuth

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -27,7 +27,9 @@ def authenticate_manual(credentials_path, code):
27
  with open(credentials_path, "r") as f:
28
  client_config = json.load(f)
29
 
30
- flow = InstalledAppFlow.from_client_config(client_config, SCOPES)
 
 
31
  auth_url, _ = flow.authorization_url(prompt='consent')
32
 
33
  if code:
 
27
  with open(credentials_path, "r") as f:
28
  client_config = json.load(f)
29
 
30
+ # Forzar uso de redirect_uri manual
31
+ client_config["installed"]["redirect_uris"] = ["urn:ietf:wg:oauth:2.0:oob"]
32
+ flow = InstalledAppFlow.from_client_config(client_config, SCOPES, redirect_uri="urn:ietf:wg:oauth:2.0:oob")
33
  auth_url, _ = flow.authorization_url(prompt='consent')
34
 
35
  if code: