diff --git a/src/pages/login/components/login-form.tsx b/src/pages/login/components/login-form.tsx index ac290f64..1332ac49 100644 --- a/src/pages/login/components/login-form.tsx +++ b/src/pages/login/components/login-form.tsx @@ -1,6 +1,4 @@ import LogoIcon from '@/assets/images/gpustack-logo.png'; -import OIDCIcon from '@/assets/images/oidc.svg'; -import SAMLIcon from '@/assets/images/saml.svg'; import { userAtom } from '@/atoms/user'; import LangSelect from '@/components/lang-select'; import ThemeDropActions from '@/components/theme-toggle/theme-drop-actions'; @@ -34,9 +32,11 @@ const BackButton = styled(Button).attrs({ `; const ButtonWrapper = styled(Button).attrs({ - shape: 'round', + type: 'primary', block: true -})``; +})` + height: 48px; +`; const ButtonText = styled.span` display: flex; @@ -201,7 +201,6 @@ const LoginForm = () => { {SSOAuth.options.oidc && ( - {intl.formatMessage( { id: 'common.external.login' }, { type: 'OIDC' } @@ -212,7 +211,6 @@ const LoginForm = () => { {SSOAuth.options.saml && ( - {intl.formatMessage( { id: 'common.external.login' }, { type: 'SAML' } diff --git a/src/pages/login/hooks/use-sso-auth.ts b/src/pages/login/hooks/use-sso-auth.ts index 14bc7b2e..dd8b8905 100644 --- a/src/pages/login/hooks/use-sso-auth.ts +++ b/src/pages/login/hooks/use-sso-auth.ts @@ -57,10 +57,13 @@ export function useSSOAuth({ oidcLogin(); } else if (authConfig.is_saml) { samlLogin(); + } else { + onError?.(new Error('No SSO configuration found')); } } - } catch { + } catch (error: any) { setLoginOption({ oidc: false, saml: false }); + onError?.(error); } }; diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 91e5d5cf..b90ea0e5 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -30,7 +30,7 @@ const Wrapper = styled.div<{ $isDarkTheme: boolean }>` `; const Box = styled.div` - padding-top: 8%; + padding-top: 10%; display: flex; flex-direction: column; justify-content: space-between;