Files
pitchfast/convex/betterAuth/adapter.ts

18 lines
425 B
TypeScript

import { createApi } from "@convex-dev/better-auth";
import { createAuthOptions } from "./auth.js";
import schema from "./schema.js";
const createSchemaAuthOptions = (ctx: Parameters<typeof createAuthOptions>[0]) =>
createAuthOptions(ctx, { allowMissingSecret: true });
export const {
create,
findOne,
findMany,
updateOne,
updateMany,
deleteOne,
deleteMany,
} = createApi(schema, createSchemaAuthOptions);