@thunderid/vue 1.20.0 → 1.20.1

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.
@@ -1272,8 +1272,15 @@ const ThunderIDProvider = (0, vue.defineComponent)({
1272
1272
  userProfile.value = null;
1273
1273
  isSignedIn.value = false;
1274
1274
  });
1275
- if (await client.isSignedIn()) await updateSession();
1276
- else {
1275
+ if (await client.isSignedIn()) {
1276
+ const signedInUrl = new URL(window.location.href);
1277
+ if (hasAuthParams(signedInUrl, initializedConfig?.afterSignInUrl) && (0, __thunderid_browser.hasCalledForThisInstanceInUrl)(props.instanceId ?? 0, signedInUrl.search)) try {
1278
+ await signIn();
1279
+ } catch (error) {
1280
+ logger$6.warn("Could not complete the organization unit switch, so the current session is kept.", error);
1281
+ }
1282
+ await updateSession();
1283
+ } else {
1277
1284
  const currentUrl = new URL(window.location.href);
1278
1285
  if (hasAuthParams(currentUrl, initializedConfig?.afterSignInUrl) && (0, __thunderid_browser.hasCalledForThisInstanceInUrl)(props.instanceId ?? 0, currentUrl.search)) try {
1279
1286
  const urlParams = currentUrl.searchParams;
package/dist/index.js CHANGED
@@ -1246,8 +1246,15 @@ const ThunderIDProvider = defineComponent({
1246
1246
  userProfile.value = null;
1247
1247
  isSignedIn.value = false;
1248
1248
  });
1249
- if (await client.isSignedIn()) await updateSession();
1250
- else {
1249
+ if (await client.isSignedIn()) {
1250
+ const signedInUrl = new URL(window.location.href);
1251
+ if (hasAuthParams(signedInUrl, initializedConfig?.afterSignInUrl) && hasCalledForThisInstanceInUrl(props.instanceId ?? 0, signedInUrl.search)) try {
1252
+ await signIn();
1253
+ } catch (error) {
1254
+ logger$6.warn("Could not complete the organization unit switch, so the current session is kept.", error);
1255
+ }
1256
+ await updateSession();
1257
+ } else {
1251
1258
  const currentUrl = new URL(window.location.href);
1252
1259
  if (hasAuthParams(currentUrl, initializedConfig?.afterSignInUrl) && hasCalledForThisInstanceInUrl(props.instanceId ?? 0, currentUrl.search)) try {
1253
1260
  const urlParams = currentUrl.searchParams;
@@ -1 +1 @@
1
- {"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ThunderIDProvider.ts"],"names":[],"mappings":"AA4BA,OAAO,EAEL,KAAK,SAAS,EAcf,MAAM,KAAK,CAAC;AAkDb;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,iBAAiB,EAAE,SAqgBvB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../src/providers/ThunderIDProvider.ts"],"names":[],"mappings":"AA4BA,OAAO,EAEL,KAAK,SAAS,EAcf,MAAM,KAAK,CAAC;AAkDb;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,iBAAiB,EAAE,SAshBvB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderid/vue",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
4
4
  "description": "Vue SDK for ThunderID",
5
5
  "keywords": [
6
6
  "thunderid",