Dart Reference v2.0

Update a user

Updates user data for a logged in user.

  • In order to use the updateUser() method, the user needs to be signed in first.
  • By default, email updates sends a confirmation link to both the user's current and new email. To only send a confirmation link to the user's new email, disable Secure email change in your project's email auth provider settings.
Parameters
    attributes
    REQUIRED
    UserAttributes

    Attributes to update for the user.

    emailRedirectTo
    Optional
    String

    The URI to redirect the user to after the email is updated.


final UserResponse res = await supabase.auth.updateUser(
  UserAttributes(
    email: '[email protected]',
  ),
);
final User? updatedUser = res.user;