LandSprutte
LandSprutte
DTDrizzle Team
Created by LandSprutte on 8/14/2023 in #help
Authjs extending user model for Role based auth trouble.
Recently started to use the new drizzle-adapter for Authjs. And I am having trouble extending the user-model for role based auth. I am not interested in getting the role from my provider (Discord) I want to manage the role in my own DB. Currently when I try to apply the role as shown in the docs (https://authjs.dev/guides/basics/role-based-access-control) TypeScript says that there are no "role"-property on the AdapterUser. How do I override the AdapterUser to include my role-property, so TypeScript isn't mad at me. 🙂 I'am using Sveltkit.
1 replies