Better Auth triggers with Convex
The examples show:
import { components, internal } from "./_generated/api";
import { createClient, type AuthFunctions } from "@convex-dev/better-auth";
const authFunctions: AuthFunctions = internal.auth;
export const authComponent = createClient<DataModel>(components.betterAuth, {
authFunctions,
triggers: {
user: {
onCreate: async (ctx, doc) => { /* ... */ },
},
},
});
In my project, internal.auth doesn’t exist in ./_generated/api because I don’t have any internal functions exported from convex/auth.ts.
How is internal.auth supposed to be defined / generated? Is there an example of what should go in convex/auth.ts so that internal.auth exists.
