Skip to content

Commit

Permalink
Enable autoredirect to IdP
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasHirt committed Oct 7, 2020
1 parent 6f22eab commit 7777d74
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
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
}
}

0 comments on commit 7777d74

Please sign in to comment.