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(
  '11111111-1111-1111-1111-111111111111',
  { email: '[email protected]' }
)