Skip to main content

Change Password

Change Password

You can change password of the user by calling the changePassword method.

const newPassword = "123456";
const oldPassword = "123123456";

// Change the oldPassword of the user with the newPassword
const result = await agnost.auth.changePassword(newPassword, oldPassword);

Parameters

Here you can find parameters for the changePassword method.

#

Name

Data type

Required

Description

1newPasswordStringYesThe new password of the user. Password can be at least 6 char.
2oldPasswordStringYesThe old password of the user.
note

An active user session is required (e.g., user needs to be logged in) to call this method.