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

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

Open
jmancherje opened this issue May 24, 2016 · 0 comments
Open

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

jmancherje opened this issue May 24, 2016 · 0 comments

Comments

@jmancherje
Copy link

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!

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

No branches or pull requests

1 participant