fix possible URL replacement bug in oauth callback

This commit is contained in:
Katalina / stardust 2018-01-17 23:33:08 -06:00
parent f7238ab091
commit 6a4ac388f4

View file

@ -35,12 +35,12 @@ class OauthCallback extends Component {
const retry = async () => {
try {
const rsp = await superagent.get('/api/auth/user')
this.setState({ notReady: false })
this.props.dispatch({
type: Symbol.for('set user'),
data: rsp.body
})
this.props.dispatch(fetchServers)
this.setState({ notReady: false })
} catch (e) {
counter++
if (counter > 100) {
@ -69,7 +69,7 @@ class OauthCallback extends Component {
}
render () {
return (this.state.notReady) ? this.state.message : <Redirect to={this.state.redirect} replace />
return (this.state.notReady) ? this.state.message : <Redirect to={this.state.redirect} />
}
}