Skip to content
On this page

useCustomerPassword ​

Definition ​

Composable for customer password management.

Basic usage ​

ts
const {  updatePassword, resetPassword } = useCustomerPassword();

Signature ​

ts
export function useCustomerPassword(): UseCustomerPasswordReturn 

Return type ​

See UseCustomerPasswordReturn
ts
export type UseCustomerPasswordReturn = {
  /**
   * Change customer's current password
   */
  updatePassword(
    updatePasswordData: operations["changePassword post /account/change-password"]["body"],
  ): Promise<
    operations["changePassword post /account/change-password"]["response"]
  >;
  /**
   * Reset customer's password
   */
  resetPassword(
    resetPasswordData: operations["sendRecoveryMail post /account/recovery-password"]["body"],
  ): Promise<
    operations["sendRecoveryMail post /account/recovery-password"]["response"]
  >;
};

Methods ​

NameTypeDescription
updatePassword
Promise<>
Change customer's current password
resetPassword
Promise<>
Reset customer's password
useCustomerPassword has loaded