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

Fixed: app redirection when login into launchpad using url #93

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Already active session": "Already active session",
"Failed to fetch user-profile, please try again": "Failed to fetch user-profile, please try again",
"Launch Pad": "Launch Pad",
"Login": "Login",
"Logout": "Logout",
Expand Down
6 changes: 3 additions & 3 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
<div class="type" v-for="category in Object.keys(appCategory)" :key="category">
<h3>{{ category }}</h3>
<div class="apps">
<ion-card button class="app" v-for="app in appCategory[category]" :key="app.handle" :href="scheme + app.handle + domain + (authStore.isAuthenticated ? `/login?oms=${authStore.getOMS}&token=${authStore.token.value}&expirationTime=${authStore.token.expiration}` : '')">
<ion-card button class="app" v-for="app in appCategory[category]" :key="app.handle" :href="scheme + app.handle + domain + (authStore.isAuthenticated ? `/login?oms=${authStore.getOMS.startsWith('http') ? authStore.getOMS.includes('/api') ? authStore.getOMS : `${authStore.getOMS}/api/` : authStore.getOMS}&token=${authStore.token.value}&expirationTime=${authStore.token.expiration}` : '')">
<div class="app-icon ion-padding">
<img :src="app.resource" />
</div>
<ion-card-header class="app-content">
<ion-card-title color="text-medium">{{ app.name }}</ion-card-title>
<ion-buttons class="app-links">
<ion-button color="medium" :href="scheme + app.handle + devHandle + domain + (authStore.isAuthenticated ? `/login?oms=${authStore.getOMS}&token=${authStore.token.value}&expirationTime=${authStore.token.expiration}` : '')">
<ion-button color="medium" :href="scheme + app.handle + devHandle + domain + (authStore.isAuthenticated ? `/login?oms=${authStore.getOMS.startsWith('http') ? authStore.getOMS.includes('/api') ? authStore.getOMS : `${authStore.getOMS}/api/` : authStore.getOMS}&token=${authStore.token.value}&expirationTime=${authStore.token.expiration}` : '')">
<ion-icon slot="icon-only" :icon="codeWorkingOutline" />
</ion-button>
<ion-button color="medium" :href="scheme + app.handle + uatHandle + domain + (authStore.isAuthenticated ? `/login?oms=${authStore.getOMS}&token=${authStore.token.value}&expirationTime=${authStore.token.expiration}` : '')">
<ion-button color="medium" :href="scheme + app.handle + uatHandle + domain + (authStore.isAuthenticated ? `/login?oms=${authStore.getOMS.startsWith('http') ? authStore.getOMS.includes('/api') ? authStore.getOMS : `${authStore.getOMS}/api/` : authStore.getOMS}&token=${authStore.token.value}&expirationTime=${authStore.token.expiration}` : '')">
<ion-icon slot="icon-only" :icon="shieldHalfOutline" />
</ion-button>
</ion-buttons>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
this.loginOption = resp.data
}
} catch (error) {
console.error(error)

Check warning on line 235 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

Unexpected console statement

Check warning on line 235 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

Unexpected console statement
}
},
async login() {
Expand All @@ -253,7 +253,7 @@
this.router.push('/')
}
} catch (error) {
console.error(error)

Check warning on line 256 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

Unexpected console statement

Check warning on line 256 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

Unexpected console statement
}
},
async samlLogin() {
Expand All @@ -266,7 +266,7 @@
this.router.push('/')
}
} catch (error) {
console.error(error)

Check warning on line 269 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

Unexpected console statement

Check warning on line 269 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

Unexpected console statement
}
},
async basicLogin() {
Expand All @@ -281,9 +281,9 @@
await this.authStore.setCurrent(current)
} catch (error) {
showToast(translate('Failed to fetch user-profile, please try again'));
console.error("error: ", error);

Check warning on line 284 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

Unexpected console statement

Check warning on line 284 in src/views/Login.vue

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

Unexpected console statement
}
this.router.push('/')
this.router.replace('/')
},
// Pass redirect as true when you want to remove all the url params when user clicks on login
async confirmActvSessnLoginOnRedrct(redirect = false) {
Expand Down
Loading