Skip to content
Snippets Groups Projects
Commit de9cd04a authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #4440 from metabase/issue-4430

Ensure login redirect includes hash/fragment
parents 1aed15d3 436b28fc
Branches
Tags
No related merge requests found
......@@ -79,7 +79,16 @@ const UserIsAuthenticated = UserAuthWrapper({
failureRedirectPath: '/auth/login',
authSelector: state => state.currentUser,
wrapperDisplayName: 'UserIsAuthenticated',
redirectAction: routerActions.replace,
redirectAction: (location) =>
// HACK: workaround for redux-auth-wrapper not including hash
// https://github.com/mjrussell/redux-auth-wrapper/issues/121
routerActions.replace({
...location,
query: {
...location.query,
redirect: location.query.redirect + (window.location.hash || "")
}
})
});
const UserIsAdmin = UserAuthWrapper({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment