@mspkapps/auth-client 0.1.9 → 0.1.11

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/AuthClient.js +11 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mspkapps/auth-client",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Lightweight client for Your Auth Service",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/AuthClient.js CHANGED
@@ -179,7 +179,17 @@ export class AuthClient {
179
179
  if (!resp.ok || json?.success === false) throw toError(resp, json, 'Delete account failed');
180
180
  return json;
181
181
  }
182
-
182
+
183
+ async sendGoogleUserSetPasswordEmail({ email }) {
184
+ const resp = await this.fetch(this._buildUrl('auth/set-password-google-user'), {
185
+ method: 'POST',
186
+ headers: this._headers(),
187
+ body: JSON.stringify({ email })
188
+ });
189
+ const json = await safeJson(resp);
190
+ if (!resp.ok || json?.success === false) throw toError(resp, json, 'Send Google user set password email failed');
191
+ return json;
192
+ }
183
193
  /**
184
194
  * Get current user profile (requires authentication)
185
195
  * @returns {Promise<Object>} User profile data