RefirebaseRefirebase

updateProfile

new

Update the current user's display name and/or photo URL.

Usage

auth.updateProfile
const { error } = await auth.updateProfile({
  displayName: 'Alice Smith',
  photoURL: 'https://cdn.example.com/new-avatar.jpg',
});

if (error) {
  console.error(error.code);
}

Parameters

ParamTypeDescription
options.displayNamestring | nullNew display name. Pass null to remove.
options.photoURLstring | nullNew photo URL. Pass null to remove.

Return value

Returns

Promise<{ error?: RefirebaseError }>

Returns an empty object on success, or an error on failure. Requires a signed-in user.