Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
5 replies
lecookie

Admin dashboard

How could I create an admin dashboard where if the user is not authenticated with next-auth it goes to /login but if he does not have admin give a 403 ? Maybe something like roles ?
Solution
There are two ways to add role-based access control (RBAC) to your application, based on the session strategy you choose. Let's see an example for each of these.
Role-based access control | Auth.js
Was this page helpful?