로그아웃을 모듈 수준 서버 액션으로 변환 (빌드 간 액션 ID 안정화)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
"use server";
|
||||
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { signOut } from "@/auth";
|
||||
|
||||
export async function logoutAction() {
|
||||
await signOut({ redirect: false });
|
||||
redirect("/login");
|
||||
}
|
||||
Reference in New Issue
Block a user