Spaces:
Running
Running
Commit
·
3da50d1
1
Parent(s):
ea6348f
name change
Browse files- api.py +5 -1
- src/components/sign-in-with-hf-button.tsx +3 -3
api.py
CHANGED
@@ -116,7 +116,11 @@ async def auth_callback(request: Request):
|
|
116 |
"client_id": CLIENT_ID,
|
117 |
"code": code,
|
118 |
"grant_type": "authorization_code",
|
119 |
-
"redirect_uri":
|
|
|
|
|
|
|
|
|
120 |
},
|
121 |
)
|
122 |
|
|
|
116 |
"client_id": CLIENT_ID,
|
117 |
"code": code,
|
118 |
"grant_type": "authorization_code",
|
119 |
+
"redirect_uri": (
|
120 |
+
"http://localhost:8000/auth/callback"
|
121 |
+
if not IS_PROD
|
122 |
+
else "https://huggingfacetb-wikiracing-llms.hf.space/auth/callback"
|
123 |
+
),
|
124 |
},
|
125 |
)
|
126 |
|
src/components/sign-in-with-hf-button.tsx
CHANGED
@@ -4,9 +4,9 @@ import { useEffect } from "react";
|
|
4 |
import { jwtDecode } from "jwt-decode";
|
5 |
|
6 |
const CLIENT_ID = "a67ef241-fb7e-4300-a6bd-8430a7565c9a";
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
|
11 |
const SCOPE = "openid%20profile%20email%20inference-api";
|
12 |
const STATE = "1234567890";
|
|
|
4 |
import { jwtDecode } from "jwt-decode";
|
5 |
|
6 |
const CLIENT_ID = "a67ef241-fb7e-4300-a6bd-8430a7565c9a";
|
7 |
+
const REDIRECT_URI = isProd
|
8 |
+
? "https://huggingfacetb-wikiracing-llms.hf.space/auth/callback"
|
9 |
+
: "http://localhost:8000/auth/callback";
|
10 |
|
11 |
const SCOPE = "openid%20profile%20email%20inference-api";
|
12 |
const STATE = "1234567890";
|