Change Password
Overview
Use these commands to intercept the change-password command.
| Input/Output | Data Type | 
|---|---|
| Input | StdChangePasswordInput | 
| Output | StdChangePasswordOutput | 
Example StdChangePasswordInput
"identity": "john.doe",
"key": {
    "simple": {
        "id": "john.doe"
    }
},
"password": "newPassword"
Example StdChangePasswordOutput
{
}
Implementation
Before change-password command
Use this logic to implement the command:
    .beforeStdChangePassword(async (context: Context, input: StdChangePasswordInput) => {
        logger.info(`Running before change password for account ${input.identity}`)
        return input
    })
The input object can be mutated and returned, but the same data type must still be returned.
After change-password command
Use this logic to implement the command:
    .afterStdChangePassword(async (context: Context, output: StdChangePasswordOutput) => {
        logger.info(`Running after change password`)
        return output
    })
The output object can be mutated and returned, but the same data type must still be returned.