ProgrUmar Logo
Module 5: Authentication & Authorization

Role-based Access Control (RBAC)

Duration: 18 mins

Adding Roles to Your Session

Extend the Auth.js session type to include a role field populated from your database. Check session.user.role in middleware, Server Components, and Server Actions to gate access at every layer.

Chat with us