Extending default Prisma models #4390
-
Question 💬Currently, I see no way to extend the default Prisma adapter models (like adding a role etc to the user table) without switching to typeORM. Am I missing something in the docs? If its possible right now, I'm not seeing anyway to override the default createUser method either. How to reproduce ☕️Contributing 🙌🏽Yes, I am willing to help answer this question in a PR |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is possible, and fairly easy to do! You can simply add the fields to your User model, and make sure you override the https://next-auth.js.org/adapters/models#user https://next-auth.js.org/configuration/providers/oauth#using-a-custom-provider |
Beta Was this translation helpful? Give feedback.
This is possible, and fairly easy to do! You can simply add the fields to your User model, and make sure you override the
profile
callback of your provider to return those values.https://next-auth.js.org/adapters/models#user
https://next-auth.js.org/configuration/providers/oauth#using-a-custom-provider