From 9e743de9f76aea081cd668c815a3c868fe7ea7ce Mon Sep 17 00:00:00 2001 From: k2maan Date: Wed, 19 Jul 2023 16:56:03 +0530 Subject: [PATCH 1/2] Implemented: routing to launchpad if no token or oms found in query --- src/components/Login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Login.ts b/src/components/Login.ts index 9a9e9d1..aacba43 100644 --- a/src/components/Login.ts +++ b/src/components/Login.ts @@ -23,7 +23,7 @@ export default defineComponent({ this.route = appContext.config.globalProperties.$route if (!Object.keys(this.route.query).length) { - this.errorMsg = 'Unable to login. Could not authenticate the user' + window.location.href = 'http://launchpad.hotwax.io/login' return } From 2d672ede5a20bd9b39e8991afdd75c8180c662fb Mon Sep 17 00:00:00 2001 From: k2maan Date: Wed, 19 Jul 2023 16:56:03 +0530 Subject: [PATCH 2/2] Implemented: routing to launchpad if no token or oms found in query --- src/components/Login.ts | 2 +- src/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Login.ts b/src/components/Login.ts index 9a9e9d1..e097cef 100644 --- a/src/components/Login.ts +++ b/src/components/Login.ts @@ -23,7 +23,7 @@ export default defineComponent({ this.route = appContext.config.globalProperties.$route if (!Object.keys(this.route.query).length) { - this.errorMsg = 'Unable to login. Could not authenticate the user' + window.location.href = appContext.appLoginUrl return } diff --git a/src/index.ts b/src/index.ts index 6050b8a..f1b391c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,6 +29,7 @@ export let dxpComponents = { loginContext.confirmSessionEnd = options.confirmSessionEnd loginContext.logout = options.logout loginContext.loader = options.loader + loginContext.appLoginUrl = options.appLoginUrl shopifyImgContext.defaultImgUrl = options.defaultImgUrl }