playing around with protected routes in React Router 4 and wondering whether something that I've been able to get to work is even possible.
<Switch>
<Route exact path="/" component={LandingPage} />
<Route path="/sign-in" component={SignIn} />
<Route exact path="/auth/home" component={Home} />
<Route exact path="/auth/my-profile" component={UserProfile} />
<ProtectedRoute path="/auth" />
</Switch>
I have these routes as shown above and I have set up a protected route called /auth
What I want is to use this to protect any and all routes starting with /auth
So in this example both
<Route exact path="/auth/home" component={Home} />
<Route exact path="/auth/my-profile" component={UserProfile} />
Would also be protected routes.
Make sense?