Skip to content
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
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
version: 2
defaults: &defaults
docker:
- image: circleci/node:8.9.4-browsers
- image: node:14
deploy_defaults: &deploy_defaults
docker:
- image: cibuilds/aws
install_dependency: &install_dependency
name: Installation of build and deployment dependencies.
command: |
sudo apt install python-dev python-pip -y
sudo pip install awscli --upgrade
apt update
apt install jq -y
apt install python-dev python-pip -y
pip install awscli --upgrade
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
Expand Down
4 changes: 2 additions & 2 deletions config/constants/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ module.exports = {
TCO17_URL : 'https://tco17.topcoder-dev.com',
TCO_HOME_URL : 'https://www.topcoder-dev.com/tco',

ACCOUNTS_APP_URL : 'https://accounts.topcoder-dev.com/#!/member',
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts.topcoder-dev.com/connector.html',
ACCOUNTS_APP_URL : 'https://accounts-auth0.topcoder-dev.com',
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts-auth0.topcoder-dev.com',

FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_DEV,
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-dev',
Expand Down
4 changes: 2 additions & 2 deletions config/constants/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ module.exports = {
TCO17_URL : 'https://tco17.topcoder.com',
TCO_HOME_URL : 'https://www.topcoder.com/tco',

ACCOUNTS_APP_URL : 'https://accounts.topcoder.com/#!/member',
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts.topcoder.com/connector.html',
ACCOUNTS_APP_URL : 'https://accounts-auth0.topcoder.com',
ACCOUNTS_APP_CONNECTOR_URL : 'https://accounts-auth0.topcoder.com',

FILE_PICKER_API_KEY: process.env.FILE_PICKER_API_KEY_PROD,
FILE_PICKER_SUBMISSION_CONTAINER_NAME: 'submission-staging-prod',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"remarkable": "^1.7.4",
"sanitize-html": "^1.27.4",
"svg-react-loader": "^0.4.5",
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#v1.0.4",
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.1",
"tc-ui": "git+https://github.com/appirio-tech/tc-ui.git#feature/connectv2",
"tlds": "^1.191.0",
"topcoder-react-utils": "0.0.39",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/loadUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
ROLE_PROGRAM_MANAGER,
ROLE_PRESALES, ROLE_PROJECT_MANAGER, ROLE_SOLUTION_ARCHITECT
} from '../config/constants'
import { getFreshToken, configureConnector, decodeToken } from 'tc-accounts'
import { getFreshToken, configureConnector, decodeToken } from 'tc-auth-lib'
import { getUserProfile } from '../api/users'
import { getUserGroups } from '../api/groups'
import { getOrgConfig } from '../api/orgConfig'
Expand Down
2 changes: 1 addition & 1 deletion src/api/requestInterceptor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import store from '../config/store'
import { getFreshToken, isTokenExpired } from 'tc-accounts'
import { getFreshToken, isTokenExpired } from 'tc-auth-lib'

export const getToken = () => {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AuthenticatedComponent.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { withRouter } from 'react-router-dom'
import { getFreshToken } from 'tc-accounts'
import { getFreshToken } from 'tc-auth-lib'
import { ACCOUNTS_APP_LOGIN_URL } from '../config/constants'

export function requiresAuthentication(Component) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import './Home.scss'
import homeImgSrc from '../../assets/images/hero-tc-landing.png'
import { DOMAIN, ACCOUNTS_APP_REGISTER_URL } from '../../config/constants'
import { DOMAIN, ACCOUNTS_APP_LOGIN_URL } from '../../config/constants'

class Home extends React.Component {
constructor(props) {
Expand All @@ -18,7 +18,7 @@ class Home extends React.Component {
}

render() {
const registerUrl = ACCOUNTS_APP_REGISTER_URL
const registerUrl = `${ACCOUNTS_APP_LOGIN_URL}?regSource=tcBusiness&retUrl=${window.location.protocol}//${window.location.host}/`
const learnMoreUrl = 'https://www.' + DOMAIN +'/about-topcoder/connect/'
return (
<div className="content content-home">
Expand Down
7 changes: 3 additions & 4 deletions src/components/TopBar/TopBarContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import _ from 'lodash'
import UserDropdown from 'appirio-tech-react-components/components/UserDropdownMenu/UserDropdownMenu'
import {
ACCOUNTS_APP_LOGIN_URL,
ACCOUNTS_APP_REGISTER_URL,
ROLE_CONNECT_COPILOT,
ROLE_CONNECT_MANAGER,
ROLE_ADMINISTRATOR,
Expand Down Expand Up @@ -72,10 +71,10 @@ class TopBarContainer extends React.Component {
const userImage = getAvatarResized(bigPhotoURL, 80)
const userName = getFullNameWithFallback(user)
const homePageUrl = `${window.location.protocol}//${window.location.host}/`
const logoutLink = `https://accounts.${DOMAIN}/#!/logout?retUrl=${homePageUrl}`
const logoutLink = `${ACCOUNTS_APP_LOGIN_URL}?logout=true&retUrl=${homePageUrl}`
const isHomePage = this.props.match.path === '/'
const loginUrl = `${ACCOUNTS_APP_LOGIN_URL}?retUrl=${window.location.protocol}//${window.location.host}/`
const registerUrl = !isHomePage ? ACCOUNTS_APP_REGISTER_URL : null
const loginUrl = `${ACCOUNTS_APP_LOGIN_URL}?regSource=tcBusiness&retUrl=${window.location.protocol}//${window.location.host}/`
const registerUrl = !isHomePage ? loginUrl : null
const isLoggedIn = !!(userRoles && userRoles.length)

const logoutClick = (evt) => {
Expand Down
4 changes: 2 additions & 2 deletions src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ export const DOMAIN = process.env.domain || 'topcoder.com'
export const CONNECT_DOMAIN = `connect.${DOMAIN}`
export const CONNECT_MAIN_PAGE_URL = `http://connect.${DOMAIN}`
export const ACCOUNTS_APP_CONNECTOR_URL = process.env.ACCOUNTS_APP_CONNECTOR_URL
export const ACCOUNTS_APP_LOGIN_URL = process.env.ACCOUNTS_APP_LOGIN_URL || `https://accounts.${DOMAIN}/#!/member`
export const ACCOUNTS_APP_REGISTER_URL = process.env.ACCOUNTS_APP_REGISTER_URL || `https://accounts.${DOMAIN}/#!/member/registration?regSource=tcBusiness`
export const ACCOUNTS_APP_LOGIN_URL = process.env.ACCOUNTS_APP_LOGIN_URL || `https://accounts-auth0.${DOMAIN}`
export const ACCOUNTS_APP_REGISTER_URL = process.env.ACCOUNTS_APP_REGISTER_URL || `https://accounts-auth0.${DOMAIN}`

export const TC_API_URL = `https://api.${DOMAIN}`
export const DIRECT_PROJECT_URL = `https://www.${DOMAIN}/direct/projectOverview?formData.projectId=`
Expand Down
2 changes: 1 addition & 1 deletion src/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import LoadingIndicator from './components/LoadingIndicator/LoadingIndicator'
import OrganizationPage from './components/SpecialPage/OrganizationPage'
import {ACCOUNTS_APP_LOGIN_URL, PROJECT_FEED_TYPE_PRIMARY, PROJECT_FEED_TYPE_MESSAGES } from './config/constants'
import { getTopic } from './api/messages'
import { getFreshToken } from 'tc-accounts'
import { getFreshToken } from 'tc-auth-lib'
import { scrollToHash } from './components/ScrollToAnchors.jsx'

import { TCEmitter } from './helpers'
Expand Down