T
TanStack4mo ago
variable-lime

Auth best practice: middleware or root beforeload?

I am just curious what people prefer and why they think it is better than the other.
1 Reply
rare-sapphire
rare-sapphire4mo ago
Hey @Nicolay , I have seen both - beforeLoad on file-route for redirecting if the user isn't logged like this - middleware on server-functions for accessing protected user data

Did you find this page helpful?