-
Notifications
You must be signed in to change notification settings - Fork 70
Description
I'm investigating migrating an app from Supabase to convex with better-auth.
I got the project working with login/signup and creating an organization. However I feel like I'm missing something?
The BetterAuth tables seems to be in a different sandboxed "component" from the app tables, and I don't see a way to access them. The docs recommend basically creating a duplicate "users" table to store users in the app table. But the ids don't match, and if you try to make them match it throws an error.
This means when you get your user id from better-auth it doesn't match the user in the users table in the app component?
Is it really intentional that when using BetterAuth with Convex you have duplicate tables of users, with different ids, and no way to query the original BetterAuth table from the app?
If that's the expected pattern, how do you map your user from the better-auth session to the user in the DB?
Also for users there's an onCreateUser hook to sync with, but I see no equivalent for organizations and teams? So how are you supposed to effectively manage those without access to the BetterAuth tables?
I'm probably missing something?