getToken -> getQueryToken

This commit is contained in:
Michael Bradley, Jr 2018-10-19 14:39:42 -05:00
parent 2abcfe5de0
commit ee13fcf3ad
1 changed files with 3 additions and 3 deletions

View File

@ -23,12 +23,12 @@ import { getCredentials, getAuthenticationError, getProcesses, getTheme } from '
const qs = require('qs'); const qs = require('qs');
class AppContainer extends Component { class AppContainer extends Component {
getToken() { getQueryToken() {
return qs.parse(this.props.location.search, {ignoreQueryPrefix: true}).token; return qs.parse(this.props.location.search, {ignoreQueryPrefix: true}).token;
} }
queryStringAuthenticate() { queryStringAuthenticate() {
const token = this.getToken(); const token = this.getQueryToken();
if (!token) { if (!token) {
return; return;
@ -54,7 +54,7 @@ class AppContainer extends Component {
this.props.authenticate(this.props.credentials.host, this.props.credentials.token); this.props.authenticate(this.props.credentials.host, this.props.credentials.token);
} }
if (this.getToken() && this.props.credentials.authenticated) { if (this.getQueryToken() && this.props.credentials.authenticated) {
const loc = Object.assign({}, this.props.location); const loc = Object.assign({}, this.props.location);
loc.search = loc.search.replace( loc.search = loc.search.replace(
/(\?|&?)(token=[\w-]*)(&?)/, /(\?|&?)(token=[\w-]*)(&?)/,