Spaces:
Sleeping
Sleeping
thomasgauthier
commited on
Commit
·
8072380
1
Parent(s):
938caa9
trying this
Browse files
README.md
CHANGED
@@ -6,7 +6,6 @@ colorTo: blue
|
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
hf_oauth: true
|
9 |
-
hf_oauth_redirect_path: /hf_login
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
hf_oauth: true
|
|
|
9 |
---
|
10 |
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
main.py
CHANGED
@@ -382,7 +382,7 @@ async def get_random_sample(dataset_name: str = Query(..., alias="dataset-name")
|
|
382 |
|
383 |
|
384 |
|
385 |
-
@app.get("/
|
386 |
async def oauth_callback(code: str, state: str):
|
387 |
# Verify the state value here
|
388 |
|
@@ -392,7 +392,7 @@ async def oauth_callback(code: str, state: str):
|
|
392 |
data={
|
393 |
'grant_type': 'authorization_code',
|
394 |
'code': code,
|
395 |
-
'redirect_uri': f'https://{space_host}/
|
396 |
'client_id': client_id,
|
397 |
'client_secret': client_secret
|
398 |
}
|
|
|
382 |
|
383 |
|
384 |
|
385 |
+
@app.get("/login/callback")
|
386 |
async def oauth_callback(code: str, state: str):
|
387 |
# Verify the state value here
|
388 |
|
|
|
392 |
data={
|
393 |
'grant_type': 'authorization_code',
|
394 |
'code': code,
|
395 |
+
'redirect_uri': f'https://{space_host}/login/callback',
|
396 |
'client_id': client_id,
|
397 |
'client_secret': client_secret
|
398 |
}
|