updateProfile
newUpdate 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
| Param | Type | Description |
|---|---|---|
options.displayName | string | null | New display name. Pass null to remove. |
options.photoURL | string | null | New 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.