File size: 484 Bytes
1e16a1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { redirect } from "@sveltejs/kit";

export const GET = async () => {
    const clientId = import.meta.env.VITE_CLIENT_ID;
    const redirectUri = import.meta.env.VITE_REDIRECT_URI;
    const url = "https://huggingface.co/oauth/authorize";
    const body = new URLSearchParams({
        client_id: clientId,
        redirect_uri: redirectUri,
        response_type: "code",
        scope: "openid",
        state: "12345",
    });

    throw redirect(302, `${url}?${body}`);
};