Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented: support to pass a redirection url to the app login from the route #296

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading