@twintag/twintag-core 0.2.289 → 0.2.290

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.
@@ -810,9 +810,9 @@ class Auth {
810
810
  static callback(code, state) {
811
811
  let decodedState = JSON.parse(atob(state));
812
812
  if (decodedState.viewId) {
813
- let lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
813
+ let lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
814
814
  if (!lsState) {
815
- lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
815
+ lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
816
816
  }
817
817
  if (lsState === null || lsState === void 0 ? void 0 : lsState.isBackendAuth) {
818
818
  return backendauthService.handleCallback(code, decodedState);
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const auth = require('./auth-2b2f17e8.js');
5
+ const auth = require('./auth-45e205e8.js');
6
6
 
7
7
  /**
8
8
  * The view object represents the current active view.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2c25b2e9.js');
6
- const auth = require('./auth-2b2f17e8.js');
6
+ const auth = require('./auth-45e205e8.js');
7
7
 
8
8
  const twintagAuthCallbackCss = ":host{display:block}";
9
9
 
@@ -204,7 +204,7 @@ class IndexedDbService {
204
204
  /**
205
205
  * The SDK version.
206
206
  */
207
- const VERSION = '0.2.289';
207
+ const VERSION = '0.0.0-VERSION';
208
208
 
209
209
  class TwintagErrorValue {
210
210
  }
@@ -113,9 +113,9 @@ export class Auth {
113
113
  static callback(code, state) {
114
114
  let decodedState = JSON.parse(atob(state));
115
115
  if (decodedState.viewId) {
116
- let lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
116
+ let lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
117
117
  if (!lsState) {
118
- lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
118
+ lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
119
119
  }
120
120
  if (lsState === null || lsState === void 0 ? void 0 : lsState.isBackendAuth) {
121
121
  return backendauthService.handleCallback(code, decodedState);
@@ -2,4 +2,4 @@
2
2
  /**
3
3
  * The library version.
4
4
  */
5
- export const VERSION = '0.2.289';
5
+ export const VERSION = '0.2.290';
@@ -810,9 +810,9 @@ class Auth {
810
810
  static callback(code, state) {
811
811
  let decodedState = JSON.parse(atob(state));
812
812
  if (decodedState.viewId) {
813
- let lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
813
+ let lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
814
814
  if (!lsState) {
815
- lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
815
+ lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
816
816
  }
817
817
  if (lsState === null || lsState === void 0 ? void 0 : lsState.isBackendAuth) {
818
818
  return backendauthService.handleCallback(code, decodedState);
@@ -200,7 +200,7 @@ class IndexedDbService {
200
200
  /**
201
201
  * The SDK version.
202
202
  */
203
- const VERSION = '0.2.289';
203
+ const VERSION = '0.0.0-VERSION';
204
204
 
205
205
  class TwintagErrorValue {
206
206
  }
@@ -808,9 +808,9 @@ class Auth {
808
808
  static callback(code, state) {
809
809
  let decodedState = JSON.parse(atob(state));
810
810
  if (decodedState.viewId) {
811
- let lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
811
+ let lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
812
812
  if (!lsState) {
813
- lsState = JSON.parse(localStorage.getItem(`${btoa(window.origin)}-state`));
813
+ lsState = JSON.parse(localStorage.getItem(`${decodedState.viewId}-state`));
814
814
  }
815
815
  if (lsState === null || lsState === void 0 ? void 0 : lsState.isBackendAuth) {
816
816
  return backendauthService.handleCallback(code, decodedState);
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { i as inIframe } from './auth-1c631a9d.js';
2
- export { A as Auth, a as AuthConfigTemplate } from './auth-1c631a9d.js';
1
+ import { i as inIframe } from './auth-87a71598.js';
2
+ export { A as Auth, a as AuthConfigTemplate } from './auth-87a71598.js';
3
3
 
4
4
  /**
5
5
  * The view object represents the current active view.
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance } from './index-e1a48b05.js';
2
- import { A as Auth } from './auth-1c631a9d.js';
2
+ import { A as Auth } from './auth-87a71598.js';
3
3
 
4
4
  const twintagAuthCallbackCss = ":host{display:block}";
5
5
 
@@ -200,7 +200,7 @@ class IndexedDbService {
200
200
  /**
201
201
  * The SDK version.
202
202
  */
203
- const VERSION = '0.2.289';
203
+ const VERSION = '0.0.0-VERSION';
204
204
 
205
205
  class TwintagErrorValue {
206
206
  }
@@ -1 +1 @@
1
- import{i as e}from"./p-08e1ea24.js";export{A as Auth,a as AuthConfigTemplate}from"./p-08e1ea24.js";class t{static getId(){const t=new URL(window.location.href).pathname.split("/").filter((e=>e.length>0)),s=t.indexOf("views");return t.length>0?e()&&s>-1?t[s+1]:t[0]:""}}export{t as View}
1
+ import{i as t}from"./p-e064b918.js";export{A as Auth,a as AuthConfigTemplate}from"./p-e064b918.js";class e{static getId(){const e=new URL(window.location.href).pathname.split("/").filter((t=>t.length>0)),s=e.indexOf("views");return e.length>0?t()&&s>-1?e[s+1]:e[0]:""}}export{e as View}
@@ -1 +1 @@
1
- import{r as t}from"./p-d5d0e2ee.js";import{A as o}from"./p-08e1ea24.js";const s=class{constructor(s){t(this,s);const a=window.location.search;let e,c,r=new URLSearchParams(a);a.includes("id_token=")?e=r.get("id_token"):a.includes("code=")&&(e=r.get("code")),a.includes("state=")&&(c=r.get("state")),o.handleCallback(e,c)}};s.style=":host{display:block}";export{s as twintag_auth_callback}
1
+ import{r as t}from"./p-d5d0e2ee.js";import{A as o}from"./p-e064b918.js";const s=class{constructor(s){t(this,s);const a=window.location.search;let e,c,r=new URLSearchParams(a);a.includes("id_token=")?e=r.get("id_token"):a.includes("code=")&&(e=r.get("code")),a.includes("state=")&&(c=r.get("state")),o.handleCallback(e,c)}};s.style=":host{display:block}";export{s as twintag_auth_callback}