webledger-auth-plugin 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ declare module '@ioc:AuthService' {
14
14
  forgotPin(uuid: string, password: string, user_pin: string): Promise<any>;
15
15
  logoutURL(): string;
16
16
  checkLoginURL(): string;
17
+ forgotPasswordMobile(params: any): Promise<any>;
17
18
  }
18
19
  const authService: AuthServiceI;
19
20
  export default authService;
@@ -64,6 +64,7 @@ export default class AuthService implements AuthServiceI {
64
64
  resendEmailVerification(email: string): Promise<import("axios").AxiosResponse<any, any>>;
65
65
  verifyPin(uuid: string, user_pin: string): Promise<import("axios").AxiosResponse<any, any>>;
66
66
  forgotPin(uuid: string, password: string, user_pin: string): Promise<import("axios").AxiosResponse<any, any>>;
67
+ forgotPasswordMobile(params: any): Promise<import("axios").AxiosResponse<any, any>>;
67
68
  logoutURL(): string;
68
69
  checkLoginURL(): string;
69
70
  }
@@ -18,6 +18,7 @@ class AuthService {
18
18
  resend_email_verification: '/api/resend_verify_email',
19
19
  verify_pin: '/api/users',
20
20
  forgot_pin: '/api/users',
21
+ forgot_password_mobile: '/api/forgot_password_mobile',
21
22
  };
22
23
  this.client = axios_1.default.create({ baseURL: config.host });
23
24
  this.client.defaults.timeout = config.timeout || 30000; // default is 30seconds
@@ -155,6 +156,11 @@ class AuthService {
155
156
  this.setAuthToken(subject);
156
157
  return this.client.post(`${this.paths[subject]}/${uuid}/forgot_pin`, { password, user_pin });
157
158
  }
159
+ forgotPasswordMobile(params) {
160
+ const subject = 'forgot_password_mobile';
161
+ this.setAuthToken(subject);
162
+ return this.client.post(this.paths[subject], params);
163
+ }
158
164
  logoutURL() {
159
165
  const url = `${this.config.host}/sso/${this.config.env}/logout?product=${this.config.product}`;
160
166
  return url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webledger-auth-plugin",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "webledger auth service AdonisJS 5 login plugin",
5
5
  "main": "build/providers/AuthServiceProvider.js",
6
6
  "scripts": {