From fe1a0a6f3b4c6d0fb5dcdf1ad33c32b35fbd7125 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Thu, 18 Oct 2018 15:36:15 -0500 Subject: [PATCH] only auth w/ stored token if there is no query string token --- embark-ui/src/containers/AppContainer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/embark-ui/src/containers/AppContainer.js b/embark-ui/src/containers/AppContainer.js index 593699c4..d5606701 100644 --- a/embark-ui/src/containers/AppContainer.js +++ b/embark-ui/src/containers/AppContainer.js @@ -25,8 +25,6 @@ const qs = require('qs'); class AppContainer extends Component { constructor (props) { super(props); - - this.queryStringAuthenticate(); } queryStringAuthenticate() { @@ -39,7 +37,7 @@ class AppContainer extends Component { if (token === this.props.credentials.token && this.props.credentials.host === host) { return; } - this.props.authenticate(host, token); + return this.props.authenticate(host, token); } componentDidMount() { @@ -53,7 +51,9 @@ class AppContainer extends Component { componentDidUpdate(){ if (this.requireAuthentication()) { - this.props.authenticate(this.props.credentials.host, this.props.credentials.token); + if (!this.queryStringAuthenticate()) { + this.props.authenticate(this.props.credentials.host, this.props.credentials.token); + } } if (this.props.credentials.authenticated && !this.props.initialized) {