convex-better-auth-dual-database
CommunityUnify Better Auth with app users reliably.
Software Engineering#better-auth#convex#data-sync#dual-database#admin-setup#auth-debugging#user-provisioning
Authorstrataga
Version1.0.0
Installs0
System Documentation
What problem does it solve?
When using Convex with Better Auth, user data can end up split between the Better Auth component tables and the app's own users table. This mismatch leads to confusing errors such as "User not found" during login or password reset even when a user exists in one store.
Core Features & Use Cases
- Unified provisioning: ensure that creating or syncing a user creates corresponding records in both Better Auth and the app’s users table.
- Admin onboarding & remediation: provide steps to manually create admin users in production and resolve divergence between data stores.
- Verification & maintenance: offer guidance to verify consistency by checking both data stores after provisioning.
Quick Start
Use the Skill to provision and synchronize a new admin user across both stores.
- Create a Better Auth user via API:
curl -X POST "https://yourapp.com/api/auth/sign-up/email"
-H "Content-Type: application/json"
-d '{"email": "admin@example.com","password": "your-password","name": "Admin User"}' - Create the corresponding app user via a Convex mutation:
npx convex run --prod adminSetup:createAdminUser
'{"email": "admin@example.com", "name": "Admin", "setupSecret": "your-secret"}' - Verify that the user exists in both data stores:
- Check _components/betterAuth/user/documents.jsonl
- Check users/documents.jsonl
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: convex-better-auth-dual-database Download link: https://github.com/strataga/claude-skill-inception/archive/main.zip#convex-better-auth-dual-database Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.