Convex auth does not work with defineEntSchema
is there a way to make it work? My entire project schema is using defineEntSchema and not the defineSchema
8 Replies
wow i think tis works.. can anyone who is smarter confirm?
const merged = defineSchema({ ...schema.tables, ...authSchema.tables });
This is working for me but i'm not sure it's ideal way though.
const schema = defineEntSchema(
{
authAccounts: defineEntFromTable(authTables.authAccounts),
authRefreshTokens: defineEntFromTable(authTables.authRefreshTokens),
authSessions: defineEntFromTable(authTables.authSessions),
authVerificationCodes: defineEntFromTable(authTables.authVerificationCodes),
authRateLimits: defineEntFromTable(authTables.authRateLimits),
authVerifiers: defineEntFromTable(authTables.authVerifiers),
I'll add this to Ents soon, for now you can inline:
wow thank you
Authentication - Convex Ents
Relations, default values, unique fields and more for Convex
Hello, I met this error. Could anybody help me?
You're missing JWT_PRIVATE_KEY, see https://labs.convex.dev/auth/setup/manual#configure-private-and-public-key
Manual Setup - Convex Auth
Authentication library for your Convex backend
Thank you very much.👍