File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,4 +95,16 @@ export default class Auth {
9595 logout ( ) {
9696 return this . api . post ( endpoints . logout ) ;
9797 }
98+
99+ // @method restorePassword(email: String): Promise
100+ // requests email instructions to reset password
101+ restorePassword ( email ) {
102+ return this . api . post ( endpoints . sendRestPassword , { email } ) ;
103+ }
104+
105+ // @method restorePassword(code: String, newPassword: String): Promise
106+ // creates new password
107+ resetPassword ( code , newPassword ) {
108+ return this . api . post ( endpoints . resetPassword , { code, newPassword } ) ;
109+ }
98110}
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ export const login = '/v1/public/login';
66export const signup = '/v1/public/registrations/new' ;
77export const googleSignin = '/v1/public/signin/google/customer' ;
88export const logout = '/v1/public/logout' ;
9+ export const sendRestPassword = '/v1/public/send-password-reset' ;
10+ export const resetPassword = '/v1/public/reset-password' ;
911
1012// product endpoints
1113export const search = `/search/products_catalog_view/_search?size=${ MAX_RESULTS } ` ;
You can’t perform that action at this time.
0 commit comments