<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [updatePassword](./auth.updatepassword.md)

## updatePassword() function

Updates the user's password.

<b>Signature:</b>

```typescript
export declare function updatePassword(user: User, newPassword: string): Promise<void>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  user | [User](./auth.user.md) | The user. |
|  newPassword | string | The new password. |

<b>Returns:</b>

Promise&lt;void&gt;

## Remarks

Important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call [reauthenticateWithCredential()](./auth.reauthenticatewithcredential.md)<!-- -->.

