Web Developer
I just got into Appwrite, it's awesome!
I'm doing authentication for my SvelteKit app and I have managed to create login and register, but when I want to create the protected routes - I'm not sure how to do it.
Is it secure to handle protected routes inside page.ts files on the client?
export const load = async ({ parent }) => { const { account } = await parent();
if (account.loggedin) { throw redirect(303, "/auth"); }}Or how should I redirect the user if they aren't authed?