Spaces:
Sleeping
Sleeping
thomasgauthier
commited on
Commit
·
f1cc9d9
1
Parent(s):
d524017
trying this
Browse files
main.py
CHANGED
@@ -400,15 +400,15 @@ async def oauth_callback(code: str, state: str):
|
|
400 |
token_data = token_response.json()
|
401 |
access_token = token_data['access_token']
|
402 |
|
403 |
-
# Fetch user information using access token
|
404 |
-
user_response = requests.get(
|
405 |
-
|
406 |
-
|
407 |
-
)
|
408 |
-
user_data = user_response.json()
|
409 |
-
username = user_data['username']
|
410 |
-
|
411 |
-
print(
|
412 |
|
413 |
return {"username": username}
|
414 |
|
|
|
400 |
token_data = token_response.json()
|
401 |
access_token = token_data['access_token']
|
402 |
|
403 |
+
# # Fetch user information using access token
|
404 |
+
# user_response = requests.get(
|
405 |
+
# 'https://huggingface.co/api/user',
|
406 |
+
# headers={'Authorization': f'Bearer {access_token}'}
|
407 |
+
# )
|
408 |
+
# user_data = user_response.json()
|
409 |
+
# username = user_data['username']
|
410 |
+
|
411 |
+
print(access_token)
|
412 |
|
413 |
return {"username": username}
|
414 |
|