@hotwax/dxp-components 1.3.3 → 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.
- package/lib/components/Login.js +1 -20
- package/lib/index.js +0 -1
- package/package.json +1 -1
package/lib/components/Login.js
CHANGED
|
@@ -35,26 +35,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
35
35
|
oms,
|
|
36
36
|
expirationTime
|
|
37
37
|
} = this.route.query;
|
|
38
|
-
|
|
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(appOms).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;
|