Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deco/deps.ts>supabase.AdminUserAttributes

deco is the edge-native site editor and app framework for building dynamic, high-performance sites with a built-in visual admin UI.
Go to Latest
interface supabase.AdminUserAttributes
implements Omit<UserAttributes, "data">
import { type supabase } from "https://deno.land/x/deco@1.35.3/deps.ts";
const { AdminUserAttributes } = supabase;

Properties

optional
user_metadata: object

A custom data object to store the user's metadata. This maps to the auth.users.user_metadata 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.

optional
app_metadata: object

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.

optional
email_confirm: boolean

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

Only a service role can modify.

optional
phone_confirm: boolean

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

Only a service role can modify.

optional
ban_duration: string | "none"

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.