Any article or case study or similar on how to migrate an existing custom auth?

I wonder if we have anything from Moving from a custom auth. Like the usual that happened years ago with passport.js and bcrypt and cookies and express etc. Ideally from a standpoint of minimal disruption to existing userbase. If not i might start this for a big case ( 7m users)
5 Replies
FalconiZzare
FalconiZzare2mo ago
There is no universal conversion for this as each product/project/code-base handles self-created auth system differently. It would be easier if you have emails linking to user data. Then you can implement OAuth and Email OTP based login and new auth flow will pickup those data. However you have to migrate your DB accordingly for this to work.
wwooddyy
wwooddyyOP2mo ago
Yeah for sure each will be different but there must be some common ground. How to handle the passwords migration for example or import existing users etc
FalconiZzare
FalconiZzare2mo ago
Go through the better auth database schema, you will see the relations. Then sit down, create a new replica of your existing db and brainstorm, then migrate that replica in a way that has the schema required by better auth and has the existing data linked to each user Let me know if you need more explanation. Maybe provide a sample schema that needs to be migrated to better auth schema
wwooddyy
wwooddyyOP2mo ago
Hey sorry maybe it was unclear but didnt mean to say i wont find how to do this heheh. I was wondering if someone already did and wrote about it
FalconiZzare
FalconiZzare2mo ago
Oh. Sorry. got it mixed up.

Did you find this page helpful?