UNPKG

voluptasmollitia

Version:
33 lines (18 loc) 1.08 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [Auth](./auth.auth.md) &gt; [updateCurrentUser](./auth.auth.updatecurrentuser.md) ## Auth.updateCurrentUser() method Asynchronously sets the provided user as [Auth.currentUser](./auth.auth.currentuser.md) on the [Auth](./auth.auth.md) instance. <b>Signature:</b> ```typescript updateCurrentUser(user: User | null): Promise<void>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | user | [User](./auth.user.md) \| null | The new [User](./auth.user.md)<!-- -->. | <b>Returns:</b> Promise&lt;void&gt; ## Remarks A new instance copy of the user provided will be made and set as currentUser. This will trigger [Auth.onAuthStateChanged()](./auth.auth.onauthstatechanged.md) and [Auth.onIdTokenChanged()](./auth.auth.onidtokenchanged.md) listeners like other sign in methods. The operation fails with an error if the user to be updated belongs to a different Firebase project.