This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,13 +379,17 @@ This may not work on an (Android) simulator. See #463.
379379 );
380380```
381381
382- #### Changing a password
382+ #### Updating a password
383+
384+ > The method name was changed in 8.0.0 from ` changePassword ` to ` updatePassword ` to better align with the Web API.
385+
383386Note that changing a password may fail if your login for this ` email ` was too long ago (per Firebase's standards, whatever they are).
384387
388+ <details >
389+ <summary >Native API</summary >
390+
385391``` js
386- firebase .changePassword ({
387- email: ' useraccount@provider.com' ,
388- oldPassword: ' myOldPassword' ,
392+ firebase .updatePassword ({
389393 newPassword: ' myNewPassword'
390394 }).then (
391395 function () {
@@ -396,6 +400,17 @@ Note that changing a password may fail if your login for this `email` was too lo
396400 }
397401 );
398402```
403+ </details >
404+
405+ <details >
406+ <summary >Web API</summary >
407+
408+ ``` typescript
409+ firebaseWebApi .auth ().updatePassword (' new-password' )
410+ .then (() => console .log (" Password updated" ))
411+ .catch (error => console .log (" Error creating user: " + error ));
412+ ```
413+ </details >
399414
400415### Phone Verification
401416* Don't forget to enable Phone login in your firebase instance.
You can’t perform that action at this time.
0 commit comments