Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,7 +88,7 @@ async def main2(request: Request):
|
|
| 88 |
@app.get("/redirect", response_class=RedirectResponse)
|
| 89 |
async def redirect(request: Request):
|
| 90 |
SPACE_HOST = os.getenv("SPACE_HOST")
|
| 91 |
-
|
| 92 |
CLIENT_ID = os.getenv("OAUTH_CLIENT_ID")
|
| 93 |
STATE = "test123"
|
| 94 |
url = f"https://huggingface.co/oauth/authorize?redirect_uri={REDIRECT_URI}&scope=openid%20profile&client_id={CLIENT_ID}&state={STATE}"
|
|
|
|
| 88 |
@app.get("/redirect", response_class=RedirectResponse)
|
| 89 |
async def redirect(request: Request):
|
| 90 |
SPACE_HOST = os.getenv("SPACE_HOST")
|
| 91 |
+
REDIRECT_URI = f"https://{SPACE_HOST}/login/callback"
|
| 92 |
CLIENT_ID = os.getenv("OAUTH_CLIENT_ID")
|
| 93 |
STATE = "test123"
|
| 94 |
url = f"https://huggingface.co/oauth/authorize?redirect_uri={REDIRECT_URI}&scope=openid%20profile&client_id={CLIENT_ID}&state={STATE}"
|