Skip to content

Commit

Permalink
Merge pull request #296 from ymaheshwari1/feat/redirection-support-or…
Browse files Browse the repository at this point in the history
…der-routing/219

Implemented: support to pass a redirection url to the app login from the route
  • Loading branch information
ravilodhi authored May 22, 2024
2 parents d1ad543 + 70ebebe commit 6a38b9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/DxpLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6a38b9a

Please sign in to comment.