diff --git a/public/app/core/components/Login/LoginServiceButtons.tsx b/public/app/core/components/Login/LoginServiceButtons.tsx index d85612bb655..65efccc4109 100644 --- a/public/app/core/components/Login/LoginServiceButtons.tsx +++ b/public/app/core/components/Login/LoginServiceButtons.tsx @@ -1,38 +1,42 @@ import React from 'react'; import config from 'app/core/config'; -const loginServices: () => LoginServices = () => ({ - saml: { - enabled: config.samlEnabled, - name: 'SAML', - className: 'github', - icon: 'key', - }, - google: { - enabled: config.oauth.google, - name: 'Google', - }, - github: { - enabled: config.oauth.github, - name: 'GitHub', - }, - gitlab: { - enabled: config.oauth.gitlab, - name: 'GitLab', - }, - grafanacom: { - enabled: config.oauth.grafana_com, - name: 'Grafana.com', - hrefName: 'grafana_com', - icon: 'grafana_com', - }, - oauth: { - enabled: config.oauth.generic_oauth, - name: config.oauth.generic_oauth ? config.oauth.generic_oauth.name : 'OAuth', - icon: 'sign-in', - hrefName: 'generic_oauth', - }, -}); +const loginServices: () => LoginServices = () => { + const oauthEnabled = !!config.oauth; + + return { + saml: { + enabled: config.samlEnabled, + name: 'SAML', + className: 'github', + icon: 'key', + }, + google: { + enabled: oauthEnabled && config.oauth.google, + name: 'Google', + }, + github: { + enabled: oauthEnabled && config.oauth.github, + name: 'GitHub', + }, + gitlab: { + enabled: oauthEnabled && config.oauth.gitlab, + name: 'GitLab', + }, + grafanacom: { + enabled: oauthEnabled && config.oauth.grafana_com, + name: 'Grafana.com', + hrefName: 'grafana_com', + icon: 'grafana_com', + }, + oauth: { + enabled: oauthEnabled && config.oauth.generic_oauth, + name: oauthEnabled && config.oauth.generic_oauth ? config.oauth.generic_oauth.name : 'OAuth', + icon: 'sign-in', + hrefName: 'generic_oauth', + }, + }; +}; export interface LoginService { enabled: boolean; diff --git a/public/app/partials/reset_password.html b/public/app/partials/reset_password.html index 085cc34d111..60f881e0cea 100644 --- a/public/app/partials/reset_password.html +++ b/public/app/partials/reset_password.html @@ -10,7 +10,7 @@
You cannot reset password when login form is disabled.
-
+
User