if (!event.locals.session && event.url.pathname.startsWith('/private')) { redirect(303, '/auth') }
if (!event.locals.session && event.url.pathname.startsWith('/private')) { redirect(303, '/auth') }
So any route I want to "protect" I need to add it to this if check? Or put protected routes into the /protected directory? Bit confused on what's the way its supposed to work.
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.