File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,16 @@ export default class Auth {
95
95
logout ( ) {
96
96
return this . api . post ( endpoints . logout ) ;
97
97
}
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
+ }
98
110
}
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ export const login = '/v1/public/login';
6
6
export const signup = '/v1/public/registrations/new' ;
7
7
export const googleSignin = '/v1/public/signin/google/customer' ;
8
8
export const logout = '/v1/public/logout' ;
9
+ export const sendRestPassword = '/v1/public/send-password-reset' ;
10
+ export const resetPassword = '/v1/public/reset-password' ;
9
11
10
12
// product endpoints
11
13
export const search = `/search/products_catalog_view/_search?size=${ MAX_RESULTS } ` ;
You can’t perform that action at this time.
0 commit comments