5.6 Change Password
To change password for a user on Bayun, use changePassword
function.
The function takes the following parameters
sessionId : Unique SessionId which is received in the login/registration function response.
currentPassword : Current Password.
newPassword : New Password.
successCallback : Success block to be executed after successful password change.
failureCallback : Failure block to be executed if password change fails, returns
BayunError
.
const successCallback = data => {
//Password Changed Successfully
};
const failureCallback = error => {
console.error(error);
};
bayunCore.ChangePassword(
sessionId,
"<currentPassword>",
"<newPassword>",
successCallback,
failureCallback
)
Last updated
Was this helpful?