diff --git a/embark-ui/src/containers/AppContainer.js b/embark-ui/src/containers/AppContainer.js index 9ab22081e..d5a47e02e 100644 --- a/embark-ui/src/containers/AppContainer.js +++ b/embark-ui/src/containers/AppContainer.js @@ -30,10 +30,11 @@ class AppContainer extends Component { } queryStringAuthenticate() { - if (!this.props.location.search) { + const token = qs.parse(this.props.location.search, {ignoreQueryPrefix: true}).token; + + if (!token) { return; } - const token = qs.parse(this.props.location.search, {ignoreQueryPrefix: true}).token; const host = process.env.NODE_ENV === 'development' ? DEFAULT_HOST : window.location.host; if (token === this.props.credentials.token && this.props.credentials.host === host) { return;