Skip to content

Commit e3d3b6c

Browse files
Merge pull request #5133 from topcoder-platform/issue-5126
Fix logout to Wipro and TCO19
2 parents 9f122b3 + b6a1760 commit e3d3b6c

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ module.exports = {
142142
STUDIO: 'https://studio.topcoder-dev.com',
143143
TCO: 'https://www.topcoder.com/tco',
144144
TCO17: 'https://tco17.topcoder.com/',
145+
TCO19: 'https://community-app.topcoder-dev.com/__community__/tco19',
145146

146147
TOPGEAR: 'https://dev-topgear.wipro.com',
147148

config/production.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = {
4141
/* Connector URL of the TC accounts App. */
4242
ACCOUNTS_APP_CONNECTOR: 'https://accounts-auth0.topcoder.com/',
4343
TCO17: 'https://tco17.topcoder.com/',
44+
TCO19: 'https://tco19.topcoder.com/',
4445

4546
TOPGEAR: 'https://topgear-app.wipro.com',
4647

src/shared/components/tc-communities/Header/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function Header(props) {
8181
icon: <IconNavExit />,
8282
// TODO: In addition to hitting ${AUTH_URL}/logout, which logs out
8383
// from the accounts-app, we should wipe out auth cookies!
84-
link: `${AUTH_URL}/logout?retUrl=${logoutRedirect}`,
84+
link: `${AUTH_URL}?logout=true&retUrl=${encodeURIComponent(logoutRedirect)}`,
8585
title: 'Log Out',
8686
}],
8787
};

src/shared/routes/Communities/TCO19/Routes.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { HeroImageLoader } from 'components/Contentful/BlogPost';
1515
import ContentfulRoute from 'components/Contentful/Route';
1616
import Profile from 'routes/Profile';
1717
import ProfileStats from 'routes/ProfileStats';
18+
import { config } from 'topcoder-react-utils';
1819

1920

2021
import headerTheme from 'components/tc-communities/communities/tco19/themes/header.scss';
@@ -28,6 +29,7 @@ export default function TCO19({ base, meta }) {
2829
baseUrl={base}
2930
pageId={match.params.pageId || 'home'}
3031
theme={headerTheme}
32+
logoutRedirect={config.URL.TCO19}
3133
/>
3234
<Switch>
3335
<Route

src/shared/routes/Communities/Wipro/Routes.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Viewport from 'components/Contentful/Viewport';
2020
import theme from 'components/tc-communities/communities/wipro/theme';
2121
import { ThemeProvider } from 'react-css-super-themr';
2222
import { Route, Switch } from 'react-router-dom';
23+
import { config } from 'topcoder-react-utils';
2324

2425
import Leaderboard from '../Leaderboard';
2526

@@ -32,6 +33,7 @@ export default function Wipro({ base, meta }) {
3233
<Header
3334
baseUrl={base}
3435
pageId={match.params.pageId || 'home'}
36+
logoutRedirect={config.URL.TOPGEAR}
3537
/>
3638
<Switch>
3739
<Route

0 commit comments

Comments
 (0)