@asgardeo/browser 0.1.11 → 0.1.12

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.
@@ -23,7 +23,7 @@ export interface SPAConfig {
23
23
  * @remarks If the consumer app the OP is hosted in different domains,
24
24
  * third party cookies has to be enabled for this to work properly.
25
25
  */
26
- enableOIDCSessionManagement?: boolean;
26
+ syncSession?: boolean;
27
27
  checkSessionInterval?: number;
28
28
  sessionRefreshInterval?: number;
29
29
  resourceServerURLs?: string[];
package/dist/cjs/index.js CHANGED
@@ -3003,7 +3003,7 @@ var MainThreadClient = async (instanceID, config, getAuthHelper) => {
3003
3003
  const isCheckSessionIframeDifferent = !(existingConfig && existingConfig.endpoints && existingConfig.endpoints.checkSessionIframe && newConfig && newConfig.endpoints && newConfig.endpoints.checkSessionIframe && existingConfig.endpoints.checkSessionIframe === newConfig.endpoints.checkSessionIframe);
3004
3004
  const config2 = { ...existingConfig, ...newConfig };
3005
3005
  await _authenticationClient.reInitialize(config2);
3006
- if (config2.enableOIDCSessionManagement && isCheckSessionIframeDifferent) {
3006
+ if (config2.syncSession && isCheckSessionIframeDifferent) {
3007
3007
  _sessionManagementHelper.reset();
3008
3008
  checkSession();
3009
3009
  }
@@ -3343,7 +3343,7 @@ var AuthenticationHelper = class {
3343
3343
  this._spaHelper.clearRefreshTokenTimeout();
3344
3344
  this._spaHelper.refreshAccessTokenAutomatically(this);
3345
3345
  }
3346
- if (checkSession && typeof checkSession === "function" && config.enableOIDCSessionManagement) {
3346
+ if (checkSession && typeof checkSession === "function" && config.syncSession) {
3347
3347
  checkSession();
3348
3348
  }
3349
3349
  } else {
@@ -3430,7 +3430,7 @@ var AuthenticationHelper = class {
3430
3430
  if (await this._authenticationClient.isSignedIn()) {
3431
3431
  this._spaHelper.clearRefreshTokenTimeout();
3432
3432
  this._spaHelper.refreshAccessTokenAutomatically(this);
3433
- if (config.enableOIDCSessionManagement) {
3433
+ if (config.syncSession) {
3434
3434
  checkSession();
3435
3435
  }
3436
3436
  return Promise.resolve(await this._authenticationClient.getUser());
@@ -3776,7 +3776,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
3776
3776
  };
3777
3777
  return communicate(message2).then((url) => {
3778
3778
  SPAUtils.setSignOutURL(url, config2.clientId, instanceID);
3779
- if (config2.enableOIDCSessionManagement) {
3779
+ if (config2.syncSession) {
3780
3780
  checkSession();
3781
3781
  }
3782
3782
  startAutoRefreshToken();
@@ -3796,7 +3796,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
3796
3796
  const tryRetrievingUserInfo = async () => {
3797
3797
  if (await isSignedIn()) {
3798
3798
  await startAutoRefreshToken();
3799
- if (config.enableOIDCSessionManagement) {
3799
+ if (config.syncSession) {
3800
3800
  checkSession();
3801
3801
  }
3802
3802
  return getUser();
@@ -3992,7 +3992,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
3992
3992
  type: UPDATE_CONFIG
3993
3993
  };
3994
3994
  await communicate(message);
3995
- if (config2.enableOIDCSessionManagement && isCheckSessionIframeDifferent) {
3995
+ if (config2.syncSession && isCheckSessionIframeDifferent) {
3996
3996
  _sessionManagementHelper.reset();
3997
3997
  checkSession();
3998
3998
  }
@@ -4029,7 +4029,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
4029
4029
  var DefaultConfig = {
4030
4030
  autoLogoutOnTokenRefreshError: false,
4031
4031
  checkSessionInterval: 3,
4032
- enableOIDCSessionManagement: false,
4032
+ syncSession: false,
4033
4033
  periodicTokenRefresh: false,
4034
4034
  sessionRefreshInterval: 300,
4035
4035
  storage: "sessionStorage" /* SessionStorage */