Supabase session

This commit is contained in:
2026-02-05 17:48:17 +01:00
parent bc65ca57c2
commit 2dfc16804a
4 changed files with 50 additions and 22 deletions
+10
View File
@@ -22,6 +22,16 @@ export async function signInWithGitHub(origin: string) {
return redirect(data.url);
}
export async function getSession() {
const supabase = await createClient();
try {
return await Core.getSession(supabase);
} catch {
return redirect("/login");
}
}
export async function signOut() {
const supabase = await createClient();