fix(auth): generate UUID ids for BetterAuth Prisma writes #427
Reference in New Issue
Block a user
Delete Branch "fix/authentik-betterauth-interop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause:
BetterAuth was generating opaque string IDs for DB creates, but auth tables (sessions/accounts/verifications) use UUID primary keys. This caused Prisma P2023 errors during OAuth state persistence in verifications.
Changes:
Verification:
Audit update after dependency remediation:
These are upstream dependency chains; no direct runtime code changes in this patch.
Web test fix: added a localStorage shim in web vitest setup so ThemeProvider tests have a full Storage API.\n\nVerification:\n- pnpm --filter @mosaic/web test (passes locally)