feat(auth): Add Authorization Code Flow and new Keycloak recipes with new video tutorials (#4234)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
IbrahimandAlireza authored and GitHub committed 2024-07-09 14:33:37 -04:00
1 parent 998302eb85
commit aefa6d94df
81 files changed
+6525 -471

No files matched your search

+6 -4
View File
@@ -138,18 +138,20 @@ const createRoutes = ({
const { userAuthenticationService } = servicesManager.services;
// Note: PrivateRoutes in react-router-dom 6.x should be defined within
// a Route element
// All routes are private by default and then we let the user auth service
// to check if it is enabled or not
// Todo: I think we can remove the second public return below
return (
<Routes>
{allRoutes.map((route, i) => {
return route.private === true ? (
<Route
key={i}
exact
path={route.path}
element={
<PrivateRoute handleUnauthenticated={() => userAuthenticationService.handleUnauthenticated()}>
<PrivateRoute
handleUnauthenticated={() => userAuthenticationService.handleUnauthenticated()}
>
<RouteWithErrorBoundary route={route} />
</PrivateRoute>
}