Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Redirect user to page before login #106

Open
willdurand opened this issue Sep 1, 2017 · 0 comments
Open

Redirect user to page before login #106

willdurand opened this issue Sep 1, 2017 · 0 comments

Comments

@willdurand
Copy link
Member

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:

const redirectUrl = process.env.SCHEME && process.env.HOST
? `${process.env.SCHEME}://${process.env.HOST}/`
: '';

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant