added neon auth
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { createAuthClient } from "@neondatabase/auth/next";
|
||||
|
||||
export const authClient = createAuthClient();
|
||||
@@ -0,0 +1,12 @@
|
||||
import { createNeonAuth } from "@neondatabase/auth/next/server";
|
||||
|
||||
export const auth = createNeonAuth({
|
||||
baseUrl: process.env.NEON_AUTH_BASE_URL!,
|
||||
cookies: {
|
||||
secret: process.env.NEON_AUTH_COOKIE_SECRET!,
|
||||
},
|
||||
});
|
||||
|
||||
export function getSession() {
|
||||
return auth.getSession();
|
||||
}
|
||||
Reference in New Issue
Block a user