@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/cjs/index.js CHANGED
@@ -6348,22 +6348,24 @@
6348
6348
  * @returns Promise to the authentication response.
6349
6349
  */
6350
6350
  startLogin(loginRequest) {
6351
+ var _a, _b;
6351
6352
  return __awaiter(this, void 0, void 0, function* () {
6352
6353
  yield __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_startPkce).call(this);
6353
- 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') }));
6354
+ 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') }));
6354
6355
  });
6355
6356
  }
6356
6357
  /**
6357
6358
  * Tries to sign in with Google authentication.
6358
6359
  * The response parameter is the result of a Google authentication.
6359
6360
  * See: https://developers.google.com/identity/gsi/web/guides/handle-credential-responses-js-functions
6360
- * @param googleResponse The Google credential response.
6361
+ * @param loginRequest Login request including Google credential response.
6361
6362
  * @returns Promise to the authentication response.
6362
6363
  */
6363
- startGoogleLogin(googleResponse) {
6364
+ startGoogleLogin(loginRequest) {
6365
+ var _a, _b;
6364
6366
  return __awaiter(this, void 0, void 0, function* () {
6365
6367
  yield __classPrivateFieldGet(this, _MedplumClient_instances, "m", _MedplumClient_startPkce).call(this);
6366
- return this.post('auth/google', googleResponse);
6368
+ 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 }));
6367
6369
  });
6368
6370
  }
6369
6371
  /**