Merge "Fix auth redirect problem when root url is accessed"
This commit is contained in:
commit
57fc87055a
@ -143,7 +143,9 @@ class App extends React.Component {
|
||||
if (auth.info.read_protected && !user.data) {
|
||||
console.log('Read-access login required')
|
||||
const redirect_target = window.location.href.slice(getHomepageUrl().length)
|
||||
localStorage.setItem('zuul_auth_redirect', redirect_target)
|
||||
// If the redirect_target is the root url, we set the zuul_auth_redirect to /
|
||||
// so that the auth callback page can redirect to the / after login
|
||||
localStorage.setItem('zuul_auth_redirect', redirect_target==='' ? '/' : redirect_target)
|
||||
this.props.signIn()
|
||||
return <Fetching />
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user