Skip to content

Authenticate on all routes - Question #26

@PurpleMonkeyWrench

Description

@PurpleMonkeyWrench

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions