strip token from URL if auth fails

This commit is contained in:
Michael Bradley, Jr 2018-10-19 18:41:09 -05:00
parent d02d2f1522
commit 8d40c04107

View File

@ -70,6 +70,12 @@ class AppContainer extends Component {
this.props.authenticate(this.props.credentials.host, this.props.credentials.token);
}
if (this.getQueryToken() &&
!this.props.credentials.authenticated &&
!this.props.credentials.authenticating) {
this.props.history.replace(this.stripQueryToken(this.props.location));
}
if (this.getQueryToken() && this.props.credentials.authenticated) {
this.props.history.replace(this.stripQueryToken(this.props.location));
}