Current Limitation
Currently, the Asgardeo React SDK only provides a wrapper package for React Router (@asgardeo/react-router) [1] to secure routes with authentication. Applications using other router libraries like TanStack Router do not have first-class support, which creates integration challenges:
Current State:
- No Asgardeo package exists for TanStack Router
- Developers need to manually wire authentication logic (
useAsgardeo) into TanStack Router route definitions
- No
ProtectedRoute equivalent for TanStack Router
- Repeated boilerplate code for securing routes
- Inconsistent developer experience compared to
@asgardeo/react-router
[1] https://wso2.com/asgardeo/docs/sdks/react/guides/protecting-routes/
Suggested Improvement
Create a new package: @asgardeo/tanstack-router
This should provide seamless integration between Asgardeo authentication and TanStack Router, similar to what @asgardeo/react-router offers.
Proposed Features:
-
ProtectedRoute Component / Wrapper
-
Consistent Developer Experience
- Align with the existing
@asgardeo/react-router API to minimize learning curve
-
Samples
-
Documentation
Please select the package issue is related to
@asgardeo/tanstack-router
Version
current
Reporter Checklist
Current Limitation
Currently, the Asgardeo React SDK only provides a wrapper package for React Router (
@asgardeo/react-router) [1] to secure routes with authentication. Applications using other router libraries like TanStack Router do not have first-class support, which creates integration challenges:Current State:
useAsgardeo) into TanStack Router route definitionsProtectedRouteequivalent for TanStack Router@asgardeo/react-router[1] https://wso2.com/asgardeo/docs/sdks/react/guides/protecting-routes/
Suggested Improvement
Create a new package:
@asgardeo/tanstack-routerThis should provide seamless integration between Asgardeo authentication and TanStack Router, similar to what
@asgardeo/react-routeroffers.Proposed Features:
ProtectedRoute Component / Wrapper
Drop-in support for protecting TanStack Router routes
Example:
Consistent Developer Experience
@asgardeo/react-routerAPI to minimize learning curveSamples
Documentation
Please select the package issue is related to
@asgardeo/tanstack-router
Version
current
Reporter Checklist