d3adb0y
12/15/2022, 7:35 PM<Routes>
{/* This shows the login UI on "/auth" route */}
{getSuperTokensRoutesForReactRouterDom(require("react-router-dom"))}
<Route
path="/"
element={
/* This protects the "/" route so that it shows
<Home /> only if the user is logged in.
Else it redirects the user to "/auth" */
<SessionAuth
onSessionExpired={() => {
updateShowSessionExpiredPopup(true);
}}>
<Home />
{showSessionExpiredPopup && <SessionExpiredPopup />}
</SessionAuth>
}
/>
</Routes>