Skip to content
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

Authenticate on all routes - Question #26

Open
PurpleMonkeyWrench opened this issue Jan 28, 2020 · 0 comments
Open

Authenticate on all routes - Question #26

PurpleMonkeyWrench opened this issue Jan 28, 2020 · 0 comments

Comments

@PurpleMonkeyWrench
Copy link

How would you modify this example to authenticate the user on all routes?

So if the application where setup with a Main Page, Page 1, Page 2, and Page 3, each with it's own route, how could you make it so if the user wanted to enter the application on Page 1 it would redirect to a login page and then direct them back to Page 1 once they've logged in?

Is it recommended that on each route you would need to do a check to see if the user is logged in or is there a better DRY principled way to do it?

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

No branches or pull requests

1 participant