Back to Clerk

`User.update({ password: 'x' })` -> `User.updatePassword('x')`

packages/upgrade/src/versions/core-2/common/user-update-password.md

latest603 B
Original Source

If you are updating a user's password via the User.update method, it must be changed to User.updatePassword instead. This method will require the current password as well as the desired new password. We made this update to improve the security of password changes. Example below:

diff
- user.update({ password: 'foo' });

+ user.updatePassword({
+   currentPassword: 'bar',
+   newPassword: 'foo',
+   signOutOfOtherSessions: true,
+ });