updateUserProfile method

Future<MyAccountProfile> updateUserProfile({
  1. String? givenName,
  2. String? familyName,
  3. String? name,
  4. String? nickname,
  5. String? picture,
})

Updates the current user's editable profile fields, and returns the full, updated MyAccountProfile.

Parameters left as null are not sent and remain unchanged. Calling this method with no parameters is valid and returns the current profile. The update is all-or-nothing: if any field is read-only or fails validation, the whole request is rejected. On a 400 response, MyAccountException.validationErrors describes each rejected field.

Availability

This feature is currently in Beta. It might change before General Availability, and Auth0 does not support beta functionality for production use. The feature must be enabled for your tenant.

Requires auth0-spa-js v2.30.0 or later, and an access token with the update:me:profile scope and audience https://{domain}/me/.

Usage example

final profile = await myAccount.updateUserProfile(
  givenName: 'Jane',
  nickname: 'jane',
);

Implementation

Future<MyAccountProfile> updateUserProfile({
  String? givenName,
  String? familyName,
  String? name,
  String? nickname,
  String? picture,
}) =>
    Auth0FlutterWebPlatform.instance.updateUserProfile(
        MyAccountUpdateUserProfileOptions(
            accessToken: _accessToken,
            givenName: givenName,
            familyName: familyName,
            name: name,
            nickname: nickname,
            picture: picture));