Spaces:
Sleeping
Sleeping
Commit
·
000928c
1
Parent(s):
c2a8d1e
return access token
Browse files
main.py
CHANGED
|
@@ -387,7 +387,7 @@ async def oauth_callback(code: str, state: str):
|
|
| 387 |
# Verify the state value here
|
| 388 |
|
| 389 |
|
| 390 |
-
|
| 391 |
try:
|
| 392 |
token_response = requests.post(
|
| 393 |
'https://huggingface.co/oauth/token',
|
|
@@ -415,7 +415,7 @@ async def oauth_callback(code: str, state: str):
|
|
| 415 |
# username = user_data['username']
|
| 416 |
|
| 417 |
|
| 418 |
-
return {}
|
| 419 |
|
| 420 |
@app.get("/oauth-config")
|
| 421 |
async def get_oauth_config(request: Request):
|
|
|
|
| 387 |
# Verify the state value here
|
| 388 |
|
| 389 |
|
| 390 |
+
access_token = ""
|
| 391 |
try:
|
| 392 |
token_response = requests.post(
|
| 393 |
'https://huggingface.co/oauth/token',
|
|
|
|
| 415 |
# username = user_data['username']
|
| 416 |
|
| 417 |
|
| 418 |
+
return {"access_token": access_token}
|
| 419 |
|
| 420 |
@app.get("/oauth-config")
|
| 421 |
async def get_oauth_config(request: Request):
|