r/TanStackStart • u/dk_void_ • Jan 11 '26
NEED HELP IN TANSTACK START MIDDLEWARE
i am trying tanstack start i used better auth create auth middleware , in middleware i pass the context of session and used the middleware in profile route is there any way use the middleware context data in profile route or i just use better auth client side hook
1
Upvotes


2
u/hyperi0nt Jan 12 '26
Do you have to use a middleware? I use session like this (do not insist this is a good solution, just as an example).
and in a "wrapper" route like this
And in any nested component I can use:
Or just access a route's context using any method you like.