how can i migrate user accounts from nextauth (mongo with prisma) to better auth (drizzle + pgsql)
so it should be pretty straight forward, but about the userid and accountid
can i generate that to be random?
Solution:Jump to solution
Yeah those can be random, if you really want it to match what Better-auth would generate out of the box you can use our function:
...
18 Replies
Solution
Yeah those can be random, if you really want it to match what Better-auth would generate out of the box you can use our function:
also
what about the account table?
these have to have some kind of values?

cuz i tried signing in
with my account
(resetted the password first and it worked)
but the 2fa mail is not coming through
2fa mail?
yeah
otp
lemme try again cuz i set all users to two fa disabled
migrated again with the better auth id generator
So you've already migrated everything right? This is just a separate question?
yeah
logging in rn
hold on

these are strictly for oauth providers?

Yeah most cases, yeah
session is fine
now lemme try to enable
twofa

oh
it works now
awesome
nice
trying discord auth rn
could i possibly
migrate discord links too?
nvm i can't
cuz i don't have anything related to discord saved in the db only the id and discord email
jesus my auth was so bad
@Ping passwords have to be updated by the user, there's no way to do this automatically?
If NextAuth is using a different hashing algorithm than Better-auth, then yes.
Since hashes can't be "unhashed" it means we don't know their password, so we can't automate converting password hashes.