redux-auth-wrapper
redux-auth-wrapper copied to clipboard
No question mark befor query param on redirect
Instead of redirecting to /login?redirect=...
, I'm getting redirected to loginredirect=...
, i.e. the question mark is missing from before the query param. I suspect I've just done something silly, but I can't figure it out.
I have the following set up for my routes:
const userIsAuthenticated = connectedRouterRedirect({
redirectPath: "/login",
authenticatedSelector: isLoggedIn,
wrapperDisplayName: "UserIsAuthenticated",
});
const routes = (
<div>
<Switch>
<Route
exact
path="/"
component={userIsAuthenticated(AuthorListContainer)}
></Route>
<Route path="/login" component={Login}></Route>
</Switch>
</div>
);
Versions:
react-router: 5.2.0
connected-react-router: 6.8.0
react: 16.13.1
redux-auth-wrapper: 3.0.0
I had the same issue after I upgraded history from 4.10.1 to version 5.x.x. Rolling back fixed it.
Working version:
"history": "4.10.1",
"react": "16.13.1",
"redux": "^4.0.5",
"redux-auth-wrapper": "^3.0.0",
Thanks @shane-kerwin , probably a breaking change in the history API. You can see here this repo has only been testing up to history v4. I'll look add a note along with a maintenance notice as Im no longer actively maintaining this repo.