Update a user
Parameters
uid
REQUIRED
GenerateLinkTypeUser ID of the user to update.
attributes
REQUIRED
AdminUserAttributesAttributes to update for the user.
email
REQUIRED
StringThe email address of the user.
password
REQUIRED
StringThe password of the user.
phone
Optional
StringThe phone number of the user.
userMetadata
Optional
Map<String, dynamic>A custom data object to store the user's metadata. This maps to the `auth.users.user_metadata` column.
appMetadata
Optional
Map<String, dynamic>A custom data object to store the user's application specific metadata. This maps to the `auth.users.app_metadata` column.
emailConfirm
Optional
boolWhether to confirm the user's email address.
phoneConfirm
Optional
boolWhether to confirm the user's phone number.
banDuration
Optional
StringDetermines how long a user is banned for. Some possible durations include '300ms', '2h45m'.
await supabase.auth.admin.updateUserById(
'6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
attributes: AdminUserAttributes(
email: '[email protected]',
),
);