Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
how can i migrate user accounts from nextauth (mongo with prisma) to better auth (drizzle + pgsql) - Better Auth
BA
Better Auth
•
8mo ago
•
39 replies
david
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
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
:
import
{ generateId }
from
"better-auth"
;
import
{ generateId }
from
"better-auth"
;
Jump to solution
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Migrate from next auth to better auth
BA
Better Auth / help
11mo ago
Migrating from nextauth/auth.js to better-auth
BA
Better Auth / help
9mo ago
Better auth with prisma V7
BA
Better Auth / help
3mo ago