diff --git a/docs/content/docs/plugins/admin.mdx b/docs/content/docs/plugins/admin.mdx index fbea862753..5c3dcf41ef 100644 --- a/docs/content/docs/plugins/admin.mdx +++ b/docs/content/docs/plugins/admin.mdx @@ -67,7 +67,7 @@ The Admin plugin provides a set of administrative functions for user management ## Usage -Before performing any admin operations, the user must be authenticated with an admin account. An admin is any user assigned the `admin` role. For the first admin user, you'll need to manually assign the `admin` role to their account in your database. +Before performing any admin operations, the user must be authenticated with an admin account. An admin is any user assigned the `admin` role or any user whose ID is included in the `adminUserIds` option. ### Create User @@ -332,6 +332,16 @@ admin({ }) ``` +### Admin userIds + +You can pass an array of userIds that should be considered as admin. Default to `[]` + +```ts title="auth.ts" +admin({ + adminUserIds: ["user_id_1", "user_id_2"] +}) +``` + ### impersonationSessionDuration The duration of the impersonation session in seconds. Defaults to 1 hour.