@hotwax/dxp-components 1.3.2 → 1.3.4

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.
@@ -35,26 +35,7 @@ var _default = (0, _vue.defineComponent)({
35
35
  oms,
36
36
  expirationTime
37
37
  } = this.route.query;
38
- const appToken = this.authStore.token.value;
39
- const appOms = this.authStore.oms;
40
- const appExpirationTime = this.authStore.token.expiration;
41
-
42
- // show alert if token/oms exist and are different from the app's
43
- if (appToken && token && (appToken != token || appOms != oms)) {
44
- // for backward compatibility
45
- this.authStore.$patch({
46
- token: {
47
- value: appToken,
48
- expiration: appExpirationTime
49
- },
50
- oms: appOms
51
- });
52
- _index.loginContext.confirmSessionEnd('dev-oms').then(isConfirmed => {
53
- isConfirmed ? this.handleUserFlow(token, oms, expirationTime) : this.router.push('/');
54
- });
55
- } else {
56
- this.handleUserFlow(token, oms, expirationTime);
57
- }
38
+ this.handleUserFlow(token, oms, expirationTime);
58
39
  },
59
40
  methods: {
60
41
  async handleUserFlow(token, oms, expirationTime) {
package/lib/index.js CHANGED
@@ -66,7 +66,6 @@ let dxpComponents = {
66
66
  app.component('Login', _Login.default);
67
67
  app.component('ShopifyImg', _ShopifyImg.default);
68
68
  loginContext.login = options.login;
69
- loginContext.confirmSessionEnd = options.confirmSessionEnd;
70
69
  loginContext.logout = options.logout;
71
70
  loginContext.loader = options.loader;
72
71
  loginContext.appLoginUrl = options.appLoginUrl;
@@ -47,6 +47,4 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"userAuth", {
47
47
  };
48
48
  oms: string;
49
49
  }>) => boolean | "";
50
- }, {
51
- authenticate(): Promise<void>;
52
- }>;
50
+ }, {}>;
package/lib/store/auth.js CHANGED
@@ -28,17 +28,6 @@ const useAuthStore = (0, _pinia.defineStore)('userAuth', {
28
28
  return state.token.value && !isTokenExpired;
29
29
  }
30
30
  },
31
- actions: {
32
- // TODO will be done once backend support is there
33
- async authenticate() {
34
- // try {
35
- // // authenticate through cookies
36
- // return this.token
37
- // } catch (error) {
38
- // console.log(error)
39
- // }
40
- }
41
- },
42
31
  persist: true
43
32
  });
44
33
  exports.useAuthStore = useAuthStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotwax/dxp-components",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",