redux-oidc-example
redux-oidc-example copied to clipboard
Authenticate on all routes - Question
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?