Implement a new method for changing user passwords the secure way. The method requires the old password to be provided before a new password can be used. REST API: POST /api/users/change-password Authorization: your-token-id Content-Type: application/json {"oldPassword":"old-pass", "newPassword": "new-pass"} JavaScript API: User.changePassword(userId, oldPassword, newPassword[, cb]) There is also an instance-level (prototype) method that can be used from JavaScript: userInstance.changePassword(oldPassword, newPassword[, cb]) |
||
---|---|---|
.. | ||
models |