Skip to content

Commit

Permalink
Merge pull request #102 from ymaheshwari1/feat/launchpad-login-using-url
Browse files Browse the repository at this point in the history
Fixed: case in login to not redirect the user to any app if the user is coming from the oms
  • Loading branch information
ymaheshwari1 authored May 2, 2024
2 parents 4a25284 + 2d07903 commit 26e5d7e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,9 @@ export default defineComponent({
// Run the basic login flow when oms and token both are found in query
if (this.$route.query?.oms && this.$route.query?.token) {
if(this.authStore.getRedirectUrl) {
const routeOms = this.$route.query?.oms as string
const omsUrl = routeOms.startsWith('http') ? routeOms.includes('/api') ? routeOms : `${routeOms}/api/` : routeOms
window.location.href = `${this.authStore.getRedirectUrl}?oms=${omsUrl}&token=${this.$route.query?.token}`
} else {
await this.basicLogin()
this.dismissLoader();
return;
}
await this.basicLogin()
this.dismissLoader();
return;
} else if (this.$route.query?.token) {
// SAML login handling as only token will be returned in the query when login through SAML
await this.samlLogin()
Expand Down

0 comments on commit 26e5d7e

Please sign in to comment.