dylanebert's picture
dylanebert HF staff
remove prompt=consent
f784cf5
raw
history blame contribute delete
484 Bytes
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}`);
};