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
Describe the issue
I want to use the Prisma adapter while keeping my existing database schema and relationships.
Currently, I have a more complex database schema than the basic Auth.js schema, with additional fields and relationships. I'd like to find a way to use the Prisma adapter while maintaining these custom fields/relations, rather than creating a completely custom adapter from scratch.
I've tried:
Adding fields to the basic Prisma adapter schema
Looking for examples of extended Prisma adapters
Reading through the documentation
But I haven't found clear guidance on how to extend the Prisma adapter while maintaining its core functionality.
Would like to understand:
If it's possible to extend the Prisma adapter without creating a custom adapter
Best practices for adding custom fields/relations while using the Prisma adapter
Any recommended approaches for this use case
Reproduce
Have an existing Prisma schema with custom fields/relations
Try to integrate Auth.js Prisma adapter while maintaining existing schema structure
Face difficulties in extending the adapter while keeping core functionality
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
-
Adapter type
@auth/prisma-adapter
Environment
Reproduction URL
Describe the issue
I want to use the Prisma adapter while keeping my existing database schema and relationships.
Currently, I have a more complex database schema than the basic Auth.js schema, with additional fields and relationships. I'd like to find a way to use the Prisma adapter while maintaining these custom fields/relations, rather than creating a completely custom adapter from scratch.
I've tried:
But I haven't found clear guidance on how to extend the Prisma adapter while maintaining its core functionality.
Would like to understand:
Reproduce
Beta Was this translation helpful? Give feedback.
All reactions