Replies: 1 comment
-
|
request middleware is server only. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, in TanStack Start when we do <Link to="someProtectedPage" ...> the server side doesn’t run. Only client-side navigation happens. Since the server-side middlewares don’t run, we can’t check whether the user is logged in or not. How do you solve this problem? I know it can be done in beforeLoader (by using serverFn for auth inside beforeLoader), but is that the correct and secure way? If that’s the right approach, then what is middleware for?
Beta Was this translation helpful? Give feedback.
All reactions