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 <ischolten.is@gmail.com>
pull/17836/head
Ariel Salem 2020-04-22 09:42:39 -07:00 committed by GitHub
parent e150377f48
commit 960ec964f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 13 deletions

View File

@ -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",

View File

@ -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<WithRouterProps> = ({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