Move login and logout actions into app/(auth)/actions.ts
parent
bcfdc5c27a
commit
a44fb24136
@ -1,10 +0,0 @@
|
||||
"use server";
|
||||
|
||||
import { headers } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
import { auth } from "@/lib/auth";
|
||||
|
||||
export async function logout() {
|
||||
await auth.api.signOut({ headers: await headers() });
|
||||
redirect("/login");
|
||||
}
|
||||
Loading…
Reference in New Issue