crick icon indicating copy to clipboard operation
crick copied to clipboard

Redirect user to page before login

Open willdurand opened this issue 8 years ago • 0 comments

If a user click a link to Crick (that is not the homepage) and she is not logged in, she will be redirected to the login screen. Once logged in, she will be redirected to the homepage and not to the page she clicked at the very beginning. This is due to #105 but the fix was needed to avoid authentication errors.

My idea would be to add a query parameter (e.g., next) to redirectUrl in the Auth/reducer.js file:

https://github.com/TailorDev/crick/blob/e7bd902cdf0c65b3e5e5824379eb3eafd1b5969a/web/src/Auth/reducer.js#L18-L20

If we have this parameter in the URL, we should redirect the user.

willdurand avatar Sep 01 '17 22:09 willdurand