-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
When using the admin plugin and adding roles to the routeRules auth config:
routeRules: {
'/admin/**': { auth: { user: { role: 'admin' } } }, // Object literal may only specify known properties, and role does not exist in type
'/login': { auth: 'guest' },
},I did augment the AuthUser type but it's still not type-safe:
import '#nuxt-better-auth'
declare module '#nuxt-better-auth' {
interface AuthUser {
role: 'user' | 'admin'
...
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels