mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +00:00
fix possible URL replacement bug in oauth callback
This commit is contained in:
parent
f7238ab091
commit
6a4ac388f4
1 changed files with 2 additions and 2 deletions
|
@ -35,12 +35,12 @@ class OauthCallback extends Component {
|
||||||
const retry = async () => {
|
const retry = async () => {
|
||||||
try {
|
try {
|
||||||
const rsp = await superagent.get('/api/auth/user')
|
const rsp = await superagent.get('/api/auth/user')
|
||||||
this.setState({ notReady: false })
|
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: Symbol.for('set user'),
|
type: Symbol.for('set user'),
|
||||||
data: rsp.body
|
data: rsp.body
|
||||||
})
|
})
|
||||||
this.props.dispatch(fetchServers)
|
this.props.dispatch(fetchServers)
|
||||||
|
this.setState({ notReady: false })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
counter++
|
counter++
|
||||||
if (counter > 100) {
|
if (counter > 100) {
|
||||||
|
@ -69,7 +69,7 @@ class OauthCallback extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
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} />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue