#RouteGuard with FileRoutes
8 messages · Page 1 of 1 (latest)
Authjs has an example of how to achieve that...
I think I would use something like this:
https://authjs.dev/reference/solidstart/protected#when-using-csr
And then you can switch protectedRoutes against unprotectedRoutes
Hey @honest sigil ! I checked this out already and got more confused how solid-start is structured. Why do I need to have protectedRoutes in my server code? Am I still using SSR even when it's off?
I started a bug issue on github about this just a bit ago
For now, I could only switch to manually placing routes in RouteGuard vs unprotected
No, you are not using SSR when it is off, but your server will serve the page in CSR mode.
I thought you were using SSR and I like using a middleware more than wrapping every route in Protected, and, as stated below the example:
Note: the CSR method should also work when using SSR, the SSR method shouldn't work when using CSR
But I don't know exactly how Solid-Start is structured and it is a bit... interesting, that this works in CSR mode tbh
Interesting that CSR is still being pushed by a server