Abhishek Thakur
commited on
Commit
·
a9995ee
1
Parent(s):
5ccf24c
sub
Browse files- competitions/utils.py +2 -2
competitions/utils.py
CHANGED
@@ -41,8 +41,8 @@ def user_authentication(token):
|
|
41 |
if "error" in resp:
|
42 |
return resp
|
43 |
if token.startswith("hf_oauth"):
|
44 |
-
user_info["id"] = resp["
|
45 |
-
user_info["name"] = resp["
|
46 |
user_info["orgs"] = []
|
47 |
else:
|
48 |
user_info["id"] = resp["id"]
|
|
|
41 |
if "error" in resp:
|
42 |
return resp
|
43 |
if token.startswith("hf_oauth"):
|
44 |
+
user_info["id"] = resp["sub"]
|
45 |
+
user_info["name"] = resp["preferred_username"]
|
46 |
user_info["orgs"] = []
|
47 |
else:
|
48 |
user_info["id"] = resp["id"]
|