Hi, I am trying to migrate from supabase auth to better-auth. We have a lot of users, and would prefer to do it without any downtime. It is okay for users to be signed out, but when signing in again, all of the supabase auth related data should be migrated. User ids should also stay the same.
What would be the cleanest option to do so?
I was playing around with database hooks. In user before create, I trigger the migration. It fails, because better-auth is trying to create the user later. Is it possible, to handle user creation on my own, by returning some flag?
Other option would be to just modify the id in before create, and than in after create, i would migrate all the other data. But this also doesn't seem to work.
Would it be better to just use regular hook?