diff --git a/src/views/Authorization/LoginView.jsx b/src/views/Authorization/LoginView.jsx index a754f88..1b0959d 100644 --- a/src/views/Authorization/LoginView.jsx +++ b/src/views/Authorization/LoginView.jsx @@ -105,7 +105,7 @@ const LoginView = () => { setChildName('') setPassword('') } - const { data: resource, isLoading: resourceLoading } = useResource() + const { data: resource } = useResource() const { showError } = useNotification() const { isAuthenticated, login: authLogin, user } = useAuth() const Navigate = useNavigate() @@ -411,10 +411,6 @@ const LoginView = () => { const showSocialLogin = import.meta.env.VITE_IS_SELF_HOSTED !== 'true' const hasSocialOptions = showSocialLogin || Boolean(resource?.identity_provider?.client_id) - // On SSO-only instances the password form, its divider and the signup link - // are hidden. Wait for the resource query to settle first so the form never - // flashes before being hidden. - const showPasswordAuth = !resourceLoading && !resource?.disable_password_auth return ( { Use a different account - ) : showPasswordAuth ? ( + ) : ( { {loginType === 'sub' ? 'Sign in as sub account' : 'Sign in'} - ) : null} - - {hasSocialOptions && (userProfile || showPasswordAuth) && ( - or continue with )} + {hasSocialOptions && or continue with} + {showSocialLogin && !Capacitor.isNativePlatform() && ( { )} - {!userProfile && - showPasswordAuth && - !resource?.is_user_creation_disabled && ( - + Don't have an account?{' '} + Navigate('/signup')} > - Don't have an account?{' '} - Navigate('/signup')} - > - Create one - - - )} + Create one + + + )}