Prompt Backend

Add SvelteKit Route Guards

Protect SvelteKit routes with auth checks and redirects.

sveltesveltekit
Insert label Route Guards
Prompt

Add route protection to this SvelteKit app. Use handle hooks or layout server load functions to check authentication before serving protected pages. Redirect unauthenticated users to login, preserve the intended destination for post-login redirect, and handle expired sessions gracefully.

Add this to your Facet Inserts in Crystl for one-click access.

Get Crystl