18 lines
379 B
TypeScript
18 lines
379 B
TypeScript
"use server";
|
|
|
|
import { auth, signIn, signOut } from "@/auth";
|
|
|
|
export async function handleGoogleLogin() {
|
|
console.log(`google action`);
|
|
await signIn("google", { redirectTo: "/" });
|
|
}
|
|
|
|
export async function checkGoogleSession() {
|
|
const session = await auth();
|
|
return session;
|
|
}
|
|
|
|
export async function handleGoogleSignout() {
|
|
await signOut({ redirectTo: "/login" });
|
|
}
|