Add Better Auth admin authentication

This commit is contained in:
2026-06-04 12:05:07 +02:00
parent 0f10bd6400
commit e660ec24aa
41 changed files with 2225 additions and 284 deletions

View File

@@ -0,0 +1,17 @@
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);