Add Admin Role to T3 Stack

Hi, not sure what I'm missing for this
in user Schema
  role          Role        @default(USER)
and then the enum for Role.. thats okay,
---
Then I tried to make a protected middleware, and noticed that session.user is only showing 4 values, role is missing, but many others too (first picture),
-- Adding role to next-auth.d.ts fixed the type definition and role appears, but the issue persists as it returns undefined instead of the role (second pic)

Any idea? Not sure what I have to do to retrieve more than those 4 values from User schema
Thanks 🙂
unknown.png
unknown.png
Was this page helpful?