updateCustomerPassword
Updates the customer's password.
This method communicates with the updateCustomerPassword endpoint of the Vue Storefront API Middleware. In turn, it receives data with the updateCustomerPassword endpoint or the Update a customer's password endpoints exposed by SCAPI / OCAPI depending on the middleware configuration.
Signature
export declare function updateCustomerPassword(
props: UpdatePasswordParams
): Promise<UpdatePasswordResult>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | UpdatePasswordParams |
Returns
A Promise that resolves with the updated customer object.
Referenced Types
UpdatePasswordParamsUpdatePasswordResult
Examples
Update a password of an already registered customer.
import { sdk } from '~/sdk.config.ts';
const userPasswordModification = await sdk.commerce.updateCustomerPassword({
currentPassword: '01dpass',
newPassword: 'newpass'
});
return userPasswordModification;