@mspkapps/auth-client 0.1.11 → 0.1.13

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mspkapps/auth-client",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Lightweight client for Your Auth Service",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/AuthClient.js CHANGED
@@ -147,11 +147,11 @@ export class AuthClient {
147
147
  return json;
148
148
  }
149
149
 
150
- async changePassword({ currentPassword, newPassword }) {
150
+ async changePassword({ email }) {
151
151
  const resp = await this.fetch(this._buildUrl('auth/change-password'), {
152
152
  method: 'POST',
153
153
  headers: this._headers(),
154
- body: JSON.stringify({ current_password: currentPassword, new_password: newPassword })
154
+ body: JSON.stringify({ email })
155
155
  });
156
156
  const json = await safeJson(resp);
157
157
  if (!resp.ok || json?.success === false) throw toError(resp, json, 'Change password failed');