Skip to content

Commit

Permalink
Implemented: support to pass a redirection url to the app login from …
Browse files Browse the repository at this point in the history
…the route
  • Loading branch information
ymaheshwari1 committed May 22, 2024
1 parent d1ad543 commit 70ebebe
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 70ebebe

Please sign in to comment.