Appearance
useCustomerPassword ​
Definition ​
Composable for customer password management.
Basic usage ​
ts
const {
errors,
updatePassword,
resetPassword
} = useCustomerPassword();
Signature ​
ts
export function useCustomerPassword(): UseCustomerPasswordReturn
Return type ​
See UseCustomerPasswordReturn
ts
export type UseCustomerPasswordReturn = {
errors: UnwrapRef<{
resetPassword: ApiError[];
updatePassword: ApiError[];
}>;
/**
* Change customer's current password
*/
updatePassword(
updatePasswordData: operations["changePassword post /account/change-password"]["body"],
): Promise<boolean>;
/**
* Reset customer's password
*/
resetPassword(
resetPasswordData: operations["sendRecoveryMail post /account/recovery-password"]["body"],
): Promise<boolean>;
};
Properties ​
Name | Type | Description |
---|---|---|
errors | UnwrapRef<{ resetPassword: ApiError[]; updatePassword: ApiError[]; }> |
Methods ​
Name | Type | Description |
---|---|---|
updatePassword | Promise<boolean> | Change customer's current password |
resetPassword | Promise<boolean> | Reset customer's password |