Uploaded December 2022 | Updated September 2026, 1 week ago
If you find my content useful and want to support the channel, consider contributing a coffee β: hbyt.us/coffee
SvelteKit is a framework for building modern, high-performance, browser-based applications. It was developed by the team behind the popular Svelte framework and is powered by Svelte. Unlike other JavaScript frameworks, it doesn't use a virtual DOM or deliver a bloated and slow application.
In this SvelteKit video, I demonstrate security concerns with using +layout.servers to protect routes and handle authentication within your SvelteKit application.
GitHub Issue: github.com/sveltejs/kit/issues/6315
β Starting Code
github.com/huntabyte/sk-layout-auth-concerns
π Final Code
github.com/huntabyte/sk-layout-auth-concerns/tree/final-source
π½ Check out my other SvelteKit Videos!
youtube.com/playlist?list=PLq30BP0TIcqXP149TyFMfRhnMT6T5--e5
π Resources Mentioned In This Video:
SvelteKit: https://kit.svelte.dev
π Become a channel member: hbyt.us/join
π¬ Discord: hbyt.us/discord
π¦ Twitter: hbyt.us/twitter
π₯οΈ Setup Stuff: hbyt.us/gear
π Topics Covered:
- How to add authentication to SvelteKit
- How to protect routes in SvelteKit
- Hooks in SvelteKit
- SvelteKit Middleware
- SvelteKit Protected Routes
- Handle hook SvelteKit
- How do hooks work in SvelteKit?
- What does the handle hook do in SvelteKit?
- Auth Guard in SvelteKit
- How to guard routes in SvelteKit
- What is SvelteKit?
- How to authenticate users in SvelteKit
- Layouts in SvelteKit
- Protect routes with layouts in SvelteKit
- SvelteKit Security
__________________________________________
(Affiliate links may be included in this description. If you choose to purchase a product from one of those links, I may receive a small commission at no cost to you. Thank you for supporting the channel!)
If you find my content useful and want to support the channel, consider contributing a coffee β: hbyt.us/coffee
SvelteKit is a framework for building modern, high-performance, browser-based applications. It was developed by the team behind the popular Svelte framework and is powered by Svelte. Unlike other JavaScript frameworks, it doesn't use a virtual DOM or deliver a bloated and slow application.
In this SvelteKit video, I demonstrate security concerns with using +layout.servers to protect routes and handle authentication within your SvelteKit application.
GitHub Issue: github.com/sveltejs/kit/issues/6315
β Starting Code
github.com/huntabyte/sk-layout-auth-concerns
π Final Code
github.com/huntabyte/sk-layout-auth-concerns/tree/final-source
π½ Check out my other SvelteKit Videos!
youtube.com/playlist?list=PLq30BP0TIcqXP149TyFMfRhnMT6T5--e5
π Resources Mentioned In This Video:
SvelteKit: https://kit.svelte.dev
π Become a channel member: hbyt.us/join
π¬ Discord: hbyt.us/discord
π¦ Twitter: hbyt.us/twitter
π₯οΈ Setup Stuff: hbyt.us/gear
π Topics Covered:
- How to add authentication to SvelteKit
- How to protect routes in SvelteKit
- Hooks in SvelteKit
- SvelteKit Middleware
- SvelteKit Protected Routes
- Handle hook SvelteKit
- How do hooks work in SvelteKit?
- What does the handle hook do in SvelteKit?
- Auth Guard in SvelteKit
- How to guard routes in SvelteKit
- What is SvelteKit?
- How to authenticate users in SvelteKit
- Layouts in SvelteKit
- Protect routes with layouts in SvelteKit
- SvelteKit Security
__________________________________________
(Affiliate links may be included in this description. If you choose to purchase a product from one of those links, I may receive a small commission at no cost to you. Thank you for supporting the channel!)










