From 960ec964f6a7d19e7dee951c0a55721e8697d6a8 Mon Sep 17 00:00:00 2001 From: Ariel Salem Date: Wed, 22 Apr 2020 09:42:39 -0700 Subject: [PATCH] fix(Logout): Reverted the Logout component functionality to maintain the original IDPE-based logout (#17830) fix(package.json): Updated the cloud-dev command to have the CLOUD_URL land on the same default port as Quartz Co-authored-by: Iris Scholten --- ui/package.json | 2 +- ui/src/Logout.tsx | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ui/package.json b/ui/package.json index be8e4a03a3..2bc1c5cbbd 100644 --- a/ui/package.json +++ b/ui/package.json @@ -19,7 +19,7 @@ "start": "yarn install && yarn generate && cross-env TS_NODE_PROJECT=\"webpack.tsconfig.json\" && yarn run build:vendor && yarn run start:dev", "start:cloud": "yarn install && yarn generate && cross-env TS_NODE_PROJECT=\"webpack.tsconfig.json\" && yarn run build:vendor && yarn run start:dev-cloud", "start:dev": "webpack-dev-server --config ./webpack.dev.ts --progress false", - "start:dev-cloud": "cross-env CLOUD_LOGOUT_URL=http://localhost:8080/api/v2/signout CLOUD_URL=http://localhost:9999 webpack-dev-server --config ./webpack.dev.ts", + "start:dev-cloud": "cross-env CLOUD_LOGOUT_URL=http://localhost:8080/api/v2/signout CLOUD_URL=http://localhost:4000 webpack-dev-server --config ./webpack.dev.ts", "start:docker": "yarn generate && yarn build:vendor && yarn run start:dev", "build": "yarn install --silent && yarn build:ci", "build:ci": "yarn generate && yarn build:vendor && webpack --config webpack.prod.ts --bail", diff --git a/ui/src/Logout.tsx b/ui/src/Logout.tsx index 000c3b5c42..1f510d8d72 100644 --- a/ui/src/Logout.tsx +++ b/ui/src/Logout.tsx @@ -1,11 +1,9 @@ // Libraries import {FC, useEffect} from 'react' import {withRouter, WithRouterProps} from 'react-router' -import auth0js from 'auth0-js' // APIs import {postSignout} from 'src/client' -import {getAuth0Config} from 'src/authorizations/apis' // Constants import {CLOUD, CLOUD_URL, CLOUD_LOGOUT_PATH} from 'src/shared/constants' @@ -15,16 +13,6 @@ import {ErrorHandling} from 'src/shared/decorators/errors' const Logout: FC = ({router}) => { const handleSignOut = async () => { - 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) { window.location.href = `${CLOUD_URL}${CLOUD_LOGOUT_PATH}` return