feat: port all auth forms to Next.js Server Actions to avoid exposing Supabase API to the browser
All checks were successful
Staging Build / build (push) Successful in 2m19s
All checks were successful
Staging Build / build (push) Successful in 2m19s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { createClient } from "@/lib/supabase/client";
|
||||
import { signOut } from "@/lib/actions/auth";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -8,8 +8,7 @@ export function LogoutButton() {
|
||||
const router = useRouter();
|
||||
|
||||
const logout = async () => {
|
||||
const supabase = createClient();
|
||||
await supabase.auth.signOut();
|
||||
await signOut();
|
||||
router.push("/auth/login");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user