Reset Password

Once a user has been successfully registered, you can reset their password using the following code snippet. When the the forgotPassword() method is called, a reset password link will be generated and sent to the user’s email address. Only the user’s email address is a mandatory attribute. The userManagement reference used in the code snippet below is the component instance.

JSON objects containing the registration details of a particular user are created as follows:

    
copy
//Create an object with the details such as email Id, platform and redirect url var data = { "email_id": "amelia.burrows@zylker.com", "platform_type": "web", "redirect_url": "https://catalyst.zoho.com" };

This object is passed as an argument to the forgotPassword() method.

Note : The promise returned will be resolved to an object in which the content key contains a confirmation message.
    
copy
//Reset password by passing the details. This in turn returns a promise. var userManagement = catalyst.userManagement; var forgotPromise = userManagement.forgotPassword(data); forgotPromise .then((response) => { console.log(response.content); }) .catch((err) => { console.log(err); });

Last Updated 2024-10-08 19:46:20 +0530 +0530