Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No question mark befor query param on redirect #267

Open
sacsar opened this issue Jun 14, 2020 · 2 comments
Open

No question mark befor query param on redirect #267

sacsar opened this issue Jun 14, 2020 · 2 comments

Comments

@sacsar
Copy link

sacsar commented Jun 14, 2020

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
@shane-kerwin
Copy link

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

@mjrussell
Copy link
Owner

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 mjrussell pinned this issue Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants