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

Redirect user to page before login #106

@willdurand

Description

@willdurand

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions