redux-oidc-example icon indicating copy to clipboard operation
redux-oidc-example copied to clipboard

Authenticate on all routes - Question

Open PurpleMonkeyWrench opened this issue 5 years ago • 0 comments

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?

PurpleMonkeyWrench avatar Jan 28 '20 14:01 PurpleMonkeyWrench