Add Better Auth admin authentication
This commit is contained in:
14
lib/auth-server.ts
Normal file
14
lib/auth-server.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { convexBetterAuthNextJs } from "@convex-dev/better-auth/nextjs";
|
||||
|
||||
export const {
|
||||
handler,
|
||||
preloadAuthQuery,
|
||||
isAuthenticated,
|
||||
getToken,
|
||||
fetchAuthQuery,
|
||||
fetchAuthMutation,
|
||||
fetchAuthAction,
|
||||
} = convexBetterAuthNextJs({
|
||||
convexUrl: process.env.NEXT_PUBLIC_CONVEX_URL!,
|
||||
convexSiteUrl: process.env.NEXT_PUBLIC_CONVEX_SITE_URL!,
|
||||
});
|
||||
Reference in New Issue
Block a user