current behavior of <LoadUser> is dependent on undefined React Router behavior since it's not returning a <Route> as a child of <Switch>.
this PR adds PrivateRoute wrapper that renders a <Route> wrapping the children if auth passes.
In this way all the Switch children are Routes and we are back in safe territory with React Router API.
As a side effect, it appears to fix the 2fa login bug.
fixes #204
current behavior of
<LoadUser>
is dependent on undefined React Router behavior since it's not returning a<Route>
as a child of<Switch>
. this PR addsPrivateRoute
wrapper that renders a<Route>
wrapping the children if auth passes. In this way all theSwitch
children areRoute
s and we are back in safe territory with React Router API. As a side effect, it appears to fix the 2fa login bug. fixes #204