You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your question
How do I manually create new users and accounts?
What are you trying to do
I have a legacy system, where I have 67 users. I'm migrating all the old system to NextJS, NextAuth and Prisma, and I need to migrate all the current users and all their data. They currently log in with email and password, so I'll register them in Auth0. I'm able to create the users using Auth0's API, but I don't know how to create them in my database (that uses NextAuth Prisma adatper models).
For the user model, I can generate the Id, email, image, createdAt and updatedAt. No issues here. My biggest doubt is regarding the account. The account model requires the following fields:
Id: no doubts here, I can generate the id.
compoundId: no idea how to generate this field.
providerType: "oauth".
providerId: "auth0".
providerAccountId: I will get this Id for each user from Auth0, no doubts here.
refreshToken: no idea how to generate this field.
accessToken: no idea how to generate this field.
accessTokenExpires: no idea how to generate this field.
dates: no issue here.
Could you give me please some advice on how to generate those fields? I'm a bit lost on this topic. Thank you very much in advance!!
This discussion was converted from issue #1524 on March 16, 2021 18:28.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Your question
How do I manually create new users and accounts?
What are you trying to do
I have a legacy system, where I have 67 users. I'm migrating all the old system to NextJS, NextAuth and Prisma, and I need to migrate all the current users and all their data. They currently log in with email and password, so I'll register them in Auth0. I'm able to create the users using Auth0's API, but I don't know how to create them in my database (that uses NextAuth Prisma adatper models).
For the user model, I can generate the Id, email, image, createdAt and updatedAt. No issues here. My biggest doubt is regarding the account. The account model requires the following fields:
Could you give me please some advice on how to generate those fields? I'm a bit lost on this topic. Thank you very much in advance!!
Beta Was this translation helpful? Give feedback.
All reactions