committing summative
This commit is contained in:
1 parent
73ac8e85be
commit
95b138f29e
44 files changed
+5319
-755
No files matched your search
@@ -0,0 +1,19 @@
|
||||
"use server";
|
||||
|
||||
import { auth, signIn, signOut } from "@/auth";
|
||||
|
||||
export async function handleGoogleLogin() {
|
||||
await signIn("google", {redirectTo: "/"})
|
||||
|
||||
}
|
||||
|
||||
export async function checkGoogleSession() {
|
||||
const session = await auth();
|
||||
return session;
|
||||
}
|
||||
|
||||
export async function handleGoogleLogout() {
|
||||
await signOut({redirectTo: "/login"})
|
||||
}
|
||||
|
||||
// creates our functions to check session, login, logout using functions we exported from auth's nextauth functions
|
||||
Reference in new issue
Block a user