Spaces:
Configuration error
Configuration error
Update server.py
Browse files
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 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 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("/")
|