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

Using with router5

Open jonaskello opened this issue 7 years ago • 3 comments

Is redux-auth-wrapper compatible with router5?

jonaskello avatar Dec 04 '17 14:12 jonaskello

It should definitely be possible, that was one the primary reasons for the refactoring in v2. I think you'd write something similar to this redirect. getRouterRedirect looks like it should return router.navigate.

The locationHelperBuilder is maybe a little more tricky, it needs to be an object that returns two functions: getRedirectQueryParam should pull /dashboad out of a url like http://my-app.example.com/login?redirect=%2fdashboard. createRedirectLoc is used to build the object to be passed to the router.navigate function.

mjrussell avatar Dec 06 '17 06:12 mjrussell

@mjrussell are you gonna include router5?

Ammonix avatar Feb 12 '18 23:02 Ammonix

I dont plan on writing support myself, no. But if someone wants to work on it and submit a PR I'd be happy to review it and try to get it in.

mjrussell avatar Mar 24 '18 14:03 mjrussell