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

Enable autoredirect to IdP #4138

Merged
merged 6 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions changelog/unreleased/login-autoredirect
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change: Enable autoredirect to the IdP

We've added a key into the theme to enable autoredirect to the IdP when entering ocis-web instead of displaying the login page first.
The default value is set to true.

https://github.com/owncloud/phoenix/pull/4138
14 changes: 12 additions & 2 deletions src/pages/login.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="oc-login" uk-height-viewport>
<div v-if="initialized" class="oc-login" uk-height-viewport>
<div class="oc-login-card uk-position-center">
<h1 v-translate class="oc-login-logo">
ownCloud
Expand Down Expand Up @@ -38,7 +38,8 @@ export default {
name: 'LoginPage',
data() {
return {
loading: false
loading: false,
initialized: false
}
},
computed: {
Expand All @@ -48,6 +49,15 @@ export default {
return this.configuration.theme.general.name
}
},

created() {
if (this.configuration.theme.loginPage.autoRedirect) {
this.login()
} else {
this.initialized = true
}
},

methods: {
...mapActions(['login'])
}
Expand Down
5 changes: 4 additions & 1 deletion src/store/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const state = {
},
filesList: {
hideDefaultStatusIndicators: false
},
loginPage: {
autoRedirect: true
}
},
options: {
Expand Down Expand Up @@ -63,7 +66,7 @@ const mutations = {
}
},
LOAD_THEME(state, theme) {
state.theme = theme
state.theme = { ...state.theme, ...theme }
}
}

Expand Down
3 changes: 3 additions & 0 deletions themes/owncloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
},
"filesList": {
"hideDefaultStatusIndicators": false
},
"loginPage": {
"autoRedirect": true
}
}