feat: hook syncUser to login callback

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-09-15 22:58:23 +00:00
parent 72ac4df486
commit 70d4743eef
10 changed files with 127 additions and 42 deletions

View File

@@ -3,8 +3,8 @@ import { v } from "convex/values"
const schema = defineSchema({
users: defineTable({
jwtSubject: v.optional(v.string()), // JWT subject from identity provider (optional for migration)
}).index("byJwtSubject", ["jwtSubject"]), // Unique index for JWT subject lookup
jwtSubject: v.string(),
}).index("byJwtSubject", ["jwtSubject"]),
files: defineTable({
storageId: v.id("_storage"),
userId: v.id("users"),