Skip to content

$fn.changePassword(param)

Updates the authentication user of the application. [asynchronous]
[v3.3.0] This is a built-in function added.

Arguments

NameTypeDescription
paramobjectUser information to update

param Details

PropertyTypeDescription
emailstringEmail
currentPasswordstringCurrent password
newPasswordstringNew password

Return Value

TypeDescription
Promise<User>Updated user information
ObjectPropertyTypeDescription
UseruserIdstringUser ID (GUID)
emailstringEmail
namestringName
custom_01stringCustom attribute 1
custom_02stringCustom attribute 2
custom_03stringCustom attribute 3
custom_04stringCustom attribute 4
custom_05stringCustom attribute 5
custom_06stringCustom attribute 6
custom_07stringCustom attribute 7
custom_08stringCustom attribute 8
custom_09stringCustom attribute 9
custom_10stringCustom attribute 10
enabledbooleanEnabled/Disabled
createdstringCreated date and time
updatedstringUpdated date and time
statusstringUser status

Sample

try {
await $fn.changePassword({
email: $param.email,
currentPassword: $param.currentPassword,
newPassword: $param.newPassword
});
} catch (err) {
 console.log("Error",err)
}