Help with Seeding Existing Users into Better Auth
Hi everyone,
I’m looking for guidance on integrating my existing users with Better Auth. My users are already formatted in JSON, all using email/password authentication, and their passwords are already encrypted. I’ve already set up Better Auth’s options to work correctly with BCryptJS.
My setup:
Database: Neon PostgreSQL
ORM: Drizzle
Framework: Next.js 15
My concerns:
User IDs – Better Auth seems to generate its own IDs rather than using the database’s auto-incremented IDs.
Accounts Table – Since my users log in via email/password, I believe I need to create an Account record for each user.
I’m unsure how to properly seed my existing users so that Better Auth recognizes them. If anyone has experience with this or can point me in the right direction, I’d really appreciate the help!
Thanks for your time!
I’m looking for guidance on integrating my existing users with Better Auth. My users are already formatted in JSON, all using email/password authentication, and their passwords are already encrypted. I’ve already set up Better Auth’s options to work correctly with BCryptJS.
My setup:
Database: Neon PostgreSQL
ORM: Drizzle
Framework: Next.js 15
My concerns:
User IDs – Better Auth seems to generate its own IDs rather than using the database’s auto-incremented IDs.
Accounts Table – Since my users log in via email/password, I believe I need to create an Account record for each user.
I’m unsure how to properly seed my existing users so that Better Auth recognizes them. If anyone has experience with this or can point me in the right direction, I’d really appreciate the help!
Thanks for your time!