From 70ebebee726df8102b57e691b8072b8f1e28ae18 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 22 May 2024 16:45:10 +0530 Subject: [PATCH] Implemented: support to pass a redirection url to the app login from the route --- src/components/DxpLogin.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/DxpLogin.vue b/src/components/DxpLogin.vue index bf1a14e..1de3dac 100644 --- a/src/components/DxpLogin.vue +++ b/src/components/DxpLogin.vue @@ -54,11 +54,11 @@ onMounted(async () => { return } - const { token, oms, expirationTime } = route.query - await handleUserFlow(token, oms, expirationTime) + const { token, oms, expirationTime, omsRedirectionUrl } = route.query + await handleUserFlow(token, oms, expirationTime, omsRedirectionUrl) }); -async function handleUserFlow(token: string, oms: string, expirationTime: string) { +async function handleUserFlow(token: string, oms: string, expirationTime: string, omsRedirectionUrl = "") { // fetch the current config for the user const appConfig = loginContext.getConfig() @@ -86,7 +86,7 @@ async function handleUserFlow(token: string, oms: string, expirationTime: string context.loader.present('Logging in') try { // redirect route will be returned for certain cases - const redirectRoute = await context.login({ token, oms }) + const redirectRoute = await context.login({ token, oms, omsRedirectionUrl }) const userStore = useUserStore() // to access baseUrl as we store only OMS in DXP