Skip to content
This repository was archived by the owner on Sep 12, 2020. It is now read-only.
This repository was archived by the owner on Sep 12, 2020. It is now read-only.

How to handle different redirects for different states of user #27

@jmancherje

Description

@jmancherje

I am trying to find a good system to redirect to /login for unauthenticated requests, but my app requires 2 stages of auth and I want to have a different redirect depending on how the JWT decodes, or on a status code.

For example, a user can register his/her email/password to login and generate a jwt. That's stage one, but then they need to do another step of registration by joining or creating a group. If they don't belong to a group they should get redirected to this /register route. Ideally if a user ever leaves the group they'll be redirected to this register route upon any subsequent request.

Is it possible to handle this with this module? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions