Skip to content

Fix logout to Wipro and TCO19 #5133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module.exports = {
STUDIO: 'https://studio.topcoder-dev.com',
TCO: 'https://www.topcoder.com/tco',
TCO17: 'https://tco17.topcoder.com/',
TCO19: 'https://community-app.topcoder-dev.com/__community__/tco19',

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

Expand Down
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = {
/* Connector URL of the TC accounts App. */
ACCOUNTS_APP_CONNECTOR: 'https://accounts-auth0.topcoder.com/',
TCO17: 'https://tco17.topcoder.com/',
TCO19: 'https://tco19.topcoder.com/',

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

Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/tc-communities/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function Header(props) {
icon: <IconNavExit />,
// TODO: In addition to hitting ${AUTH_URL}/logout, which logs out
// from the accounts-app, we should wipe out auth cookies!
link: `${AUTH_URL}/logout?retUrl=${logoutRedirect}`,
link: `${AUTH_URL}?logout=true&retUrl=${encodeURIComponent(logoutRedirect)}`,
title: 'Log Out',
}],
};
Expand Down
2 changes: 2 additions & 0 deletions src/shared/routes/Communities/TCO19/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { HeroImageLoader } from 'components/Contentful/BlogPost';
import ContentfulRoute from 'components/Contentful/Route';
import Profile from 'routes/Profile';
import ProfileStats from 'routes/ProfileStats';
import { config } from 'topcoder-react-utils';


import headerTheme from 'components/tc-communities/communities/tco19/themes/header.scss';
Expand All @@ -28,6 +29,7 @@ export default function TCO19({ base, meta }) {
baseUrl={base}
pageId={match.params.pageId || 'home'}
theme={headerTheme}
logoutRedirect={config.URL.TCO19}
/>
<Switch>
<Route
Expand Down
2 changes: 2 additions & 0 deletions src/shared/routes/Communities/Wipro/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Viewport from 'components/Contentful/Viewport';
import theme from 'components/tc-communities/communities/wipro/theme';
import { ThemeProvider } from 'react-css-super-themr';
import { Route, Switch } from 'react-router-dom';
import { config } from 'topcoder-react-utils';

import Leaderboard from '../Leaderboard';

Expand All @@ -32,6 +33,7 @@ export default function Wipro({ base, meta }) {
<Header
baseUrl={base}
pageId={match.params.pageId || 'home'}
logoutRedirect={config.URL.TOPGEAR}
/>
<Switch>
<Route
Expand Down