mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-18 16:46:38 +00:00
only auth w/ stored token if there is no query string token
This commit is contained in:
parent
4b00145e4b
commit
fe1a0a6f3b
@ -25,8 +25,6 @@ const qs = require('qs');
|
|||||||
class AppContainer extends Component {
|
class AppContainer extends Component {
|
||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.queryStringAuthenticate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
queryStringAuthenticate() {
|
queryStringAuthenticate() {
|
||||||
@ -39,7 +37,7 @@ class AppContainer extends Component {
|
|||||||
if (token === this.props.credentials.token && this.props.credentials.host === host) {
|
if (token === this.props.credentials.token && this.props.credentials.host === host) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.props.authenticate(host, token);
|
return this.props.authenticate(host, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -53,7 +51,9 @@ class AppContainer extends Component {
|
|||||||
|
|
||||||
componentDidUpdate(){
|
componentDidUpdate(){
|
||||||
if (this.requireAuthentication()) {
|
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) {
|
if (this.props.credentials.authenticated && !this.props.initialized) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user