redux-auth-wrapper icon indicating copy to clipboard operation
redux-auth-wrapper copied to clipboard

No question mark befor query param on redirect

Open sacsar opened this issue 4 years ago • 2 comments

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

sacsar avatar Jun 14 '20 13:06 sacsar

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",

shane-kerwin avatar Sep 08 '20 20:09 shane-kerwin

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.

mjrussell avatar Mar 20 '22 04:03 mjrussell