@medplum/core 0.9.19 → 0.9.20

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/dist/esm/index.js CHANGED
@@ -6342,22 +6342,24 @@ class MedplumClient extends EventTarget {
6342
6342
  * @returns Promise to the authentication response.
6343
6343
  */
6344
6344
  startLogin(loginRequest) {
6345
+ var _a, _b;
6345
6346
  return __awaiter(this, void 0, void 0, function* () {
6346
6347
  yield __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_startPkce).call(this);
6347
- return this.post('auth/login', Object.assign(Object.assign({}, loginRequest), { clientId: __classPrivateFieldGet(this, _MedplumClient_clientId, "f"), scope: DEFAULT_SCOPE, codeChallengeMethod: 'S256', codeChallenge: __classPrivateFieldGet(this, _MedplumClient_storage, "f").getString('codeChallenge') }));
6348
+ return this.post('auth/login', Object.assign(Object.assign({}, loginRequest), { clientId: (_a = loginRequest.clientId) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _MedplumClient_clientId, "f"), scope: (_b = loginRequest.scope) !== null && _b !== void 0 ? _b : DEFAULT_SCOPE, codeChallengeMethod: 'S256', codeChallenge: __classPrivateFieldGet(this, _MedplumClient_storage, "f").getString('codeChallenge') }));
6348
6349
  });
6349
6350
  }
6350
6351
  /**
6351
6352
  * Tries to sign in with Google authentication.
6352
6353
  * The response parameter is the result of a Google authentication.
6353
6354
  * See: https://developers.google.com/identity/gsi/web/guides/handle-credential-responses-js-functions
6354
- * @param googleResponse The Google credential response.
6355
+ * @param loginRequest Login request including Google credential response.
6355
6356
  * @returns Promise to the authentication response.
6356
6357
  */
6357
- startGoogleLogin(googleResponse) {
6358
+ startGoogleLogin(loginRequest) {
6359
+ var _a, _b;
6358
6360
  return __awaiter(this, void 0, void 0, function* () {
6359
6361
  yield __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_startPkce).call(this);
6360
- return this.post('auth/google', googleResponse);
6362
+ return this.post('auth/google', Object.assign(Object.assign({}, loginRequest), { clientId: (_a = loginRequest.clientId) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _MedplumClient_clientId, "f"), scope: (_b = loginRequest.scope) !== null && _b !== void 0 ? _b : DEFAULT_SCOPE }));
6361
6363
  });
6362
6364
  }
6363
6365
  /**