Spaces:
Sleeping
Sleeping
Commit
·
91356e3
1
Parent(s):
1c5d6b7
test
Browse files
main.py
CHANGED
@@ -398,7 +398,8 @@ async def oauth_callback(code: str, state: str):
|
|
398 |
'code': code,
|
399 |
'redirect_uri': f'https://{space_host}/login/callback',
|
400 |
'client_id': client_id,
|
401 |
-
'client_secret': client_secret
|
|
|
402 |
}
|
403 |
)
|
404 |
print(token_response.status_code, token_response.text)
|
@@ -416,6 +417,7 @@ async def oauth_callback(code: str, state: str):
|
|
416 |
|
417 |
return {"access_token": access_token}
|
418 |
|
|
|
419 |
@app.get("/oauth-config")
|
420 |
async def get_oauth_config(request: Request):
|
421 |
# client_host = "https://huggingface.co/spaces/thomasgauthier/ChatExplorer#request.client.host
|
|
|
398 |
'code': code,
|
399 |
'redirect_uri': f'https://{space_host}/login/callback',
|
400 |
'client_id': client_id,
|
401 |
+
'client_secret': client_secret,
|
402 |
+
'client_assertion_type': 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'
|
403 |
}
|
404 |
)
|
405 |
print(token_response.status_code, token_response.text)
|
|
|
417 |
|
418 |
return {"access_token": access_token}
|
419 |
|
420 |
+
|
421 |
@app.get("/oauth-config")
|
422 |
async def get_oauth_config(request: Request):
|
423 |
# client_host = "https://huggingface.co/spaces/thomasgauthier/ChatExplorer#request.client.host
|