Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix login
Browse files
src/routes/api/auth/+server.ts
CHANGED
@@ -20,8 +20,6 @@ export async function POST({ request }) {
|
|
20 |
`${process.env.OAUTH_CLIENT_ID}:${process.env.OAUTH_CLIENT_SECRET}`
|
21 |
).toString("base64")}`;
|
22 |
|
23 |
-
console.log(process.env.OAUTH_CLIENT_ID, process.env.OAUTH_CLIENT_SECRET, REDIRECT_URI, Authorization, code)
|
24 |
-
|
25 |
const request_auth = await fetch("https://huggingface.co/oauth/token", {
|
26 |
method: "POST",
|
27 |
headers: {
|
@@ -35,9 +33,7 @@ export async function POST({ request }) {
|
|
35 |
}),
|
36 |
});
|
37 |
|
38 |
-
const data = await request_auth.json();
|
39 |
const { access_token } = await request_auth.json();
|
40 |
-
console.log('ac', data)
|
41 |
|
42 |
if (!access_token) {
|
43 |
return json({
|
|
|
20 |
`${process.env.OAUTH_CLIENT_ID}:${process.env.OAUTH_CLIENT_SECRET}`
|
21 |
).toString("base64")}`;
|
22 |
|
|
|
|
|
23 |
const request_auth = await fetch("https://huggingface.co/oauth/token", {
|
24 |
method: "POST",
|
25 |
headers: {
|
|
|
33 |
}),
|
34 |
});
|
35 |
|
|
|
36 |
const { access_token } = await request_auth.json();
|
|
|
37 |
|
38 |
if (!access_token) {
|
39 |
return json({
|