@@ -46,22 +46,19 @@ class Loader extends React.Component {
4646 ! meta /* || (Date.now() - meta.timestamp) > MAXAGE */
4747 ) ) nextProps . loadMetaData ( communityId , tokenV3 ) ;
4848
49- /* TODO: This is a hacky way to handle SSO authentication for TopGear
50- * (Wipro) and Zurich community visitors. Should be re-factored, but not it is not
51- * clear, what exactly do we need to support it in general. */
52- if ( ( communityId === 'wipro' || communityId === 'comcast' ) && ! visitorGroups ) {
49+ /* TODO: This is a hacky way to handle SSO authentication for TopGear */
50+ if ( communityId === 'comcast' && ! visitorGroups ) {
5351 const returnUrl = encodeURIComponent ( window . location . href ) ;
54- if ( communityId === 'wipro' ) {
55- window . location = `${ config . URL . AUTH } /?retUrl=${ config . URL . TOPGEAR } &utm_source=${ communityId } ` ;
56- } else {
57- window . location = `${ config . URL . AUTH } /member?retUrl=${ returnUrl } &utm_source=${ communityId } ` ;
58- }
52+ window . location = `${ config . URL . AUTH } /member?retUrl=${ returnUrl } &utm_source=${ communityId } ` ;
5953 }
6054
61- /* Redirect odl TopGear home to new TopGear App */
62- if ( communityId === 'wipro'
63- && ( window . location . pathname === '/' || window . location . pathname === '/__community__/wipro' ) ) {
64- window . location = config . URL . TOPGEAR ;
55+ /* Redirect old TopGear home to new TopGear App and login redirect */
56+ if ( communityId === 'wipro' ) {
57+ if ( ! visitorGroups ) {
58+ window . location = `${ config . URL . AUTH } /?retUrl=${ config . URL . TOPGEAR } &utm_source=${ communityId } ` ;
59+ } else if ( window . location . pathname === '/' || window . location . pathname === '/__community__/wipro' ) {
60+ window . location = config . URL . TOPGEAR ;
61+ }
6562 }
6663 }
6764
0 commit comments