Skip to content

Commit 067c389

Browse files
author
Parth Shah
committed
fixing errors with login redirect
1 parent ff109a6 commit 067c389

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/TopBar/TopBarContainer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
ROLE_CONNECT_MANAGER,
1414
ROLE_ADMINISTRATOR,
1515
EVENT_ROUTE_CHANGE,
16+
ACCOUNTS_APP_LOGIN_URL,
1617
ACCOUNTS_APP_REGISTER_URL
1718
} from '../../config/constants'
1819

@@ -98,7 +99,8 @@ class TopBarContainer extends React.Component {
9899
const isProjectDetails = /projects\/\d+/.test(currentPath)
99100
const isHomePage = this.context.router.isActive('/', true)
100101
// NOTE: hardcoding to connectv2, once connect v1
101-
const loginUrl = `ACCOUNTS_APP_LOGIN_URL?retUrl=https://connectv2.${DOMAIN}/`
102+
window.host
103+
const loginUrl = `${ACCOUNTS_APP_LOGIN_URL}?retUrl=${window.location.protocol}//${window.location.host}/`
102104
const registerUrl = !isHomePage ? ACCOUNTS_APP_REGISTER_URL : null
103105
return (
104106
<div>

0 commit comments

Comments
 (0)