diff --git a/ui/src/Logout.tsx b/ui/src/Logout.tsx index 1605b10cac..000c3b5c42 100644 --- a/ui/src/Logout.tsx +++ b/ui/src/Logout.tsx @@ -13,18 +13,16 @@ import {CLOUD, CLOUD_URL, CLOUD_LOGOUT_PATH} from 'src/shared/constants' // Components import {ErrorHandling} from 'src/shared/decorators/errors' -// Utils -import {isFlagEnabled} from 'src/shared/utils/featureFlag' - const Logout: FC = ({router}) => { const handleSignOut = async () => { - if (CLOUD && isFlagEnabled('regionBasedLoginPage')) { - const config = await getAuth0Config() + const config = await getAuth0Config() + if (CLOUD && config.socialSignUpOn) { const auth0 = new auth0js.WebAuth({ domain: config.domain, clientID: config.clientID, }) auth0.logout({}) + window.location.href = `${CLOUD_URL}${CLOUD_LOGOUT_PATH}` return } if (CLOUD) { diff --git a/ui/src/Signin.tsx b/ui/src/Signin.tsx index e8c71b6af3..613a2b2e03 100644 --- a/ui/src/Signin.tsx +++ b/ui/src/Signin.tsx @@ -20,7 +20,7 @@ import {CLOUD, CLOUD_SIGNIN_PATHNAME} from 'src/shared/constants' import {RemoteDataState} from 'src/types' // Utils -import {isFlagEnabled} from 'src/shared/utils/featureFlag' +import {getAuth0Config} from 'src/authorizations/apis' interface State { loading: RemoteDataState @@ -83,8 +83,8 @@ export class Signin extends PureComponent { } = this.props clearInterval(this.intervalID) - - if (CLOUD && isFlagEnabled('regionBasedLoginPage')) { + const config = await getAuth0Config() + if (CLOUD && config.socialSignUpOn) { this.props.router.replace('/login') return } diff --git a/ui/src/me/components/LogoutButton.tsx b/ui/src/me/components/LogoutButton.tsx index 498cf2be9b..45ef33d275 100644 --- a/ui/src/me/components/LogoutButton.tsx +++ b/ui/src/me/components/LogoutButton.tsx @@ -4,30 +4,12 @@ import {Link} from 'react-router' // Components import {Button, ComponentSize} from '@influxdata/clockface' -import CloudExclude from 'src/shared/components/cloud/CloudExclude' -import CloudOnly from 'src/shared/components/cloud/CloudOnly' -import {CLOUD_URL, CLOUD_LOGOUT_PATH} from 'src/shared/constants' -import {FeatureFlag} from 'src/shared/utils/featureFlag' const LogoutButton: SFC = () => ( <> - - -