-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirects #8
Comments
Are you asking if the user is not authenticated (Not Logged In), not authorized (Does not have role), or is not that user(Logged in as a different user)? |
@JREastonMarks actually both |
Sorry about the extreme delay in getting back to you. Here is a copy of the code that I use. If a users authorizedStatus is not authorized then I render a login page otherwise I just allow the req to happen as usual. I use express and I typically have two different pages. One for a user that is logged in, and one that requires them to log in.
FULL DISCLOSURE: This may not be best practice and I welcome any response that has a better way of solving this. |
That worked but I use redirect instead of render |
how can I handle redirect at the control level? example if you go to url/admin take them back to sign in page if not an admin.
The text was updated successfully, but these errors were encountered: