t-convex-nextjs-saas/src/lib/auth-server.ts

15 lines
351 B
TypeScript
Raw Normal View History

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!,
});