The create-t3-app provides a small explanation about how to modify the User model in Prisma's schema.prisma file. It mentions that we need to add a default role.
But while using an auth provider, for example google, I want to know how to let next-auth and Prisma know the role of the user before the user is authenticated and their details are entered into the database? It seems like after the authentication, the user is automatically added to the database and the callback session of next auth is executed only later.
I have 2 roles in my app (a seller and a buyer). Both have different pages but use the same signin function to authenticate. How do I tell the signin function to add a particular role instead of the default one?
Thanks