From dac5f23a1e9265f6ff88c957199fb5250de2b910 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Wed, 8 Mar 2023 20:12:29 +0000 Subject: [PATCH] remove sso page --- Accounts/src/App.tsx | 2 - Accounts/src/Pages/Login.tsx | 19 ++++++-- Accounts/src/Pages/SsoLogin.tsx | 79 --------------------------------- 3 files changed, 15 insertions(+), 85 deletions(-) delete mode 100644 Accounts/src/Pages/SsoLogin.tsx diff --git a/Accounts/src/App.tsx b/Accounts/src/App.tsx index 64f22c280c..85e3251896 100644 --- a/Accounts/src/App.tsx +++ b/Accounts/src/App.tsx @@ -8,7 +8,6 @@ import { } from 'react-router-dom'; import LoginPage from './Pages/Login'; import NotFound from './Pages/NotFound'; -import SsoLoginPage from './Pages/SsoLogin'; import ForgotPasswordPage from './Pages/ForgotPassword'; import RegisterPage from './Pages/Register'; import Navigation from 'CommonUI/src/Utils/Navigation'; @@ -34,7 +33,6 @@ function App(): ReactElement { element={} /> } /> - } /> } diff --git a/Accounts/src/Pages/Login.tsx b/Accounts/src/Pages/Login.tsx index 6c98b6b257..da55e30aae 100644 --- a/Accounts/src/Pages/Login.tsx +++ b/Accounts/src/Pages/Login.tsx @@ -1,4 +1,4 @@ -import React, { FunctionComponent } from 'react'; +import React, { FunctionComponent, useState } from 'react'; import User from 'Model/Models/User'; import Route from 'Common/Types/API/Route'; import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; @@ -20,6 +20,8 @@ const LoginPage: FunctionComponent = () => { Navigation.navigate(DASHBOARD_URL); } + const [showSsoTip, setShowSSOTip] = useState(false); + return (
@@ -79,12 +81,21 @@ const LoginPage: FunctionComponent = () => { footer={

- { + setShowSSOTip(true); + }} className="text-indigo-500 hover:text-indigo-900 cursor-pointer text-sm" > Use single sign-on (SSO) instead - +

} + + {showSsoTip &&
+ Please sign in with your username and password. Once you have signed in, you'll be able to sign in via SSO that's configured for your project. +
} +

} diff --git a/Accounts/src/Pages/SsoLogin.tsx b/Accounts/src/Pages/SsoLogin.tsx deleted file mode 100644 index b68f51aed6..0000000000 --- a/Accounts/src/Pages/SsoLogin.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import React, { FunctionComponent } from 'react'; -import BasicModelForm from 'CommonUI/src/Components/Forms/BasicModelForm'; -import User from 'Model/Models/User'; -import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues'; -import Route from 'Common/Types/API/Route'; -import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType'; -import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg'; -import Link from 'CommonUI/src/Components/Link/Link'; - -const SsoLoginPage: FunctionComponent = () => { - const user: User = new User(); - - return ( -
-
- Your Company -

- Sign in to your account -

-

- Join thousands of business that use OneUptime to help them - stay online all the time. -

-
- -
-
- - model={user} - id="login-form" - name="SSO Login" - fields={[ - { - field: { - email: true, - }, - title: 'Email', - fieldType: FormFieldSchemaType.Email, - required: true, - }, - ]} - onSubmit={(_values: FormValues) => {}} - submitButtonText={'Login with SSO'} - maxPrimaryButtonWidth={true} - footer={ -
-

- - Log in with password instead - -

-
- } - /> -
-
-

- Don't have an account?{' '} - - Register. - -

-
-
-
- ); -}; - -export default SsoLoginPage;