T
TanStack2y ago
continuing-cyan

example of firebase auth / tanstack query user data fetching & tanstack router

any example project that implement firebase auth or tanstack query data fetching and store it into context api? that have protected routes, context user data (for display user data on site header)
1 Reply
continuing-cyan
continuing-cyanOP2y ago
https://tanstack.com/router/latest/docs/framework/react/guide/authenticated-routes I'm following this example but it's not working like.. isAuthenticated is false by default when page start rendering and it's need to wait for data fetching like 10-100ms and isAuthenticated will return to true
Authenticated Routes | TanStack Router Docs
Authentication is an extremely common requirement for web applications. In this guide, we'll walk through how to use TanStack Router to build protected routes, and how to redirect users to login if they try to access them. The route.beforeLoad Option

Did you find this page helpful?