diff --git a/src/components/Login/SignIn.jsx b/src/components/Login/SignIn.jsx index f19c9f4d..f1f197ea 100644 --- a/src/components/Login/SignIn.jsx +++ b/src/components/Login/SignIn.jsx @@ -20,7 +20,7 @@ import Alert from '@mui/material/Alert'; import CircularProgress from '@mui/material/CircularProgress'; import Loading from '../Shared/Loading'; -import { GoogleLoginButton, GithubLoginButton, DexLoginButton } from './ThirdPartyLoginComponents'; +import { GoogleLoginButton, GithubLoginButton, OIDCLoginButton } from './ThirdPartyLoginComponents'; // styling import { makeStyles } from '@mui/styles'; @@ -284,14 +284,15 @@ export default function SignIn({ isLoggedIn, setIsLoggedIn, wrapperSetLoading = let isGoogle = isObject(authMethods.openid?.providers?.google); // let isGitlab = isObject(authMethods.openid?.providers?.gitlab); let isGithub = isObject(authMethods.openid?.providers?.github); - let isDex = isObject(authMethods.openid?.providers?.dex); + let isOIDC = isObject(authMethods.openid?.providers?.oidc); + let oidcName = authMethods.openid?.providers?.oidc?.name; return ( {isGithub && } {isGoogle && } {/* {isGitlab && } */} - {isDex && } + {isOIDC && } ); }; @@ -308,7 +309,7 @@ export default function SignIn({ isLoggedIn, setIsLoggedIn, wrapperSetLoading = Sign In - Welcome back! Please enter your details. + Welcome back! Please login. {renderThirdPartyLoginMethods()} {Object.keys(authMethods).length > 1 && or} diff --git a/src/components/Login/ThirdPartyLoginComponents.jsx b/src/components/Login/ThirdPartyLoginComponents.jsx index cac7a16e..ead49dc2 100644 --- a/src/components/Login/ThirdPartyLoginComponents.jsx +++ b/src/components/Login/ThirdPartyLoginComponents.jsx @@ -80,14 +80,15 @@ function GitlabLoginButton({ handleClick }) { ); } -function DexLoginButton({ handleClick }) { +function OIDCLoginButton({ handleClick, oidcName }) { const classes = useStyles(); + const loginWithName = oidcName || 'OIDC'; return ( - ); } -export { GithubLoginButton, GoogleLoginButton, GitlabLoginButton, DexLoginButton }; +export { GithubLoginButton, GoogleLoginButton, GitlabLoginButton, OIDCLoginButton };