diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index 1713486c0..cc4a21c49 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -5,6 +5,7 @@
"login_desc": "Sign In to your account",
"login_unauthorized": "Invalid username or password",
"login_forbidden": "This account is inactive or has been suspended",
+ "login_more_options": "More options",
"password_force_change": "Update Password",
"password_force_change_desc": "You need to change your password",
"password_change": "Change password",
diff --git a/src/views/pages/Login.vue b/src/views/pages/Login.vue
index c66473142..2b3662914 100644
--- a/src/views/pages/Login.vue
+++ b/src/views/pages/Login.vue
@@ -21,6 +21,7 @@
v-model="input.username"
autofocus="true"
lazy="true"
+ v-show="showLoginForm"
/>
-
-
+
+
{{ $t('message.login') }}
-
+
{{ oidcLoginButtonText() }}
+ {{ $t('message.login_more_options') }}
@@ -102,7 +108,8 @@ export default {
response_type: this.$oidc.FLOW === "implicit" ? "token id_token" : "code",
scope: this.$oidc.SCOPE,
loadUserInfo: false
- })
+ }),
+ showLoginForm: false
};
},
methods: {
@@ -187,6 +194,7 @@ export default {
this.checkOidcAvailability()
.then(oidcAvailable => {
this.oidcAvailable = oidcAvailable;
+ this.showLoginForm = !oidcAvailable;
if (!oidcAvailable) {
return;
@@ -235,6 +243,8 @@ export default {
});
})
.catch(err => {
+ // automatic fallback to login form when oidc availability check failed
+ this.showLoginForm = true;
this.$toastr.e(this.$t("message.oidc_availability_check_failed"));
});
}