Javascript Reference v2.0

Update a user

Updates the user data.

Parameters
    uid
    REQUIRED
    string
    attributes
    REQUIRED
    AdminUserAttributes

    The data you want to update.

    This function should only be called on a server. Never expose your service_role key in the browser.


const { data: user, error } = await supabase.auth.admin.updateUserById(
  '6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4',
  { email: '[email protected]' }
)