From f72de10b7993b5698b37cfe4dbe93474c3905dc0 Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Mon, 28 Feb 2022 16:28:45 +0100 Subject: [PATCH] GUI: Do not show sign-in button if no IdP is available Signing in is only possible with an OpenIDConnect IdP associated to a tenant. If only a local authenticator is configured (ie H256 driver) do not display the sign-in button. Change-Id: Ic2cb9a7ba57ed7364cf2a0ece500d3d4fdcbc775 --- web/src/containers/auth/Auth.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/containers/auth/Auth.jsx b/web/src/containers/auth/Auth.jsx index e57e129639..177e9a02d1 100644 --- a/web/src/containers/auth/Auth.jsx +++ b/web/src/containers/auth/Auth.jsx @@ -264,10 +264,11 @@ class AuthContainer extends React.Component { if (info.isFetching) { return (<>
Fetching auth info ...
) } - if (auth.info && auth.info.default_realm) { + // auth_params.authority is only set if an OpenID Connect auth is available + if (auth.info && auth.info.default_realm && auth.auth_params.authority) { return this.renderButton(containerStyles) } else { - return (
-
) + return (
-
) } } }