Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

AdminUserAttributes

interface AdminUserAttributes extends Omit<UserAttributes, "data"> {
app_metadata?: object;
ban_duration?: string | "none";
email_confirm?: boolean;
id?: string;
password_hash?: string;
phone_confirm?: boolean;
role?: string;
user_metadata?: object;
}

§Extends

§
Omit<UserAttributes, "data">
[src]

§Properties

§
app_metadata?: object
[src]

A custom data object to store the user's application specific metadata. This maps to the auth.users.app_metadata column.

Only a service role can modify.

The app_metadata should be a JSON object that includes app-specific info, such as identity providers, roles, and other access control information.

§
ban_duration?: string | "none"
[src]

Determines how long a user is banned for.

The format for the ban duration follows a strict sequence of decimal numbers with a unit suffix. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

For example, some possible durations include: '300ms', '2h45m'.

Setting the ban duration to 'none' lifts the ban on the user.

§
email_confirm?: boolean
[src]

Confirms the user's email address if set to true.

Only a service role can modify.

§
id?: string
[src]

The id for the user.

Allows you to overwrite the default id set for the user.

§
password_hash?: string
[src]

The password_hash for the user's password.

Allows you to specify a password hash for the user. This is useful for migrating a user's password hash from another service.

Supports bcrypt and argon2 password hashes.

§
phone_confirm?: boolean
[src]

Confirms the user's phone number if set to true.

Only a service role can modify.

§
role?: string
[src]

The role claim set in the user's access token JWT.

When a user signs up, this role is set to authenticated by default. You should only modify the role if you need to provision several levels of admin access that have different permissions on individual columns in your database.

Setting this role to service_role is not recommended as it grants the user admin privileges.

§
user_metadata?: object
[src]

A custom data object to store the user's metadata. This maps to the auth.users.raw_user_meta_data column.

The user_metadata should be a JSON object that includes user-specific info, such as their first and last name.

Note: When using the GoTrueAdminApi and wanting to modify a user's metadata, this attribute is used instead of UserAttributes data.