adAstra144 commited on
Commit
53e454c
·
verified ·
1 Parent(s): 9c492e9

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +6 -9
server.py CHANGED
@@ -14,15 +14,12 @@ REDIRECT_URI = "https://adastra144-google-oauth.hf.space/google/auth/callback"
14
  oauth = OAuth(app)
15
  google = oauth.register(
16
  name="google",
17
- client_id=GOOGLE_CLIENT_ID,
18
- client_secret=GOOGLE_CLIENT_SECRET,
19
- access_token_url="https://oauth2.googleapis.com/token",
20
- access_token_params=None,
21
- authorize_url="https://accounts.google.com/o/oauth2/v2/auth",
22
- authorize_params=None,
23
- api_base_url="https://www.googleapis.com/oauth2/v2/",
24
- userinfo_endpoint="https://www.googleapis.com/oauth2/v2/userinfo",
25
- client_kwargs={"scope": "openid email profile"},
26
  )
27
 
28
  @app.route("/")
 
14
  oauth = OAuth(app)
15
  google = oauth.register(
16
  name="google",
17
+ client_id=os.getenv("GOOGLE_CLIENT_ID"),
18
+ client_secret=os.getenv("GOOGLE_CLIENT_SECRET"),
19
+ server_metadata_url="https://accounts.google.com/.well-known/openid-configuration",
20
+ client_kwargs={
21
+ "scope": "openid email profile"
22
+ }
 
 
 
23
  )
24
 
25
  @app.route("/")