Uploaded October 2022 | Updated November 2026, 19 hours ago
UPDATED VIDEO (PocketBase v0.8+): youtu.be/vKqWED-aPMg
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. PocketBase is an open-source backend consisting of an embedded database (SQLite) with real-time subscriptions, built-in user management, convenient dashboard UI, and simple REST-ish API.
In this SvelteKit tutorial, I demonstrate how to integrate your SvelteKit application with PocketBase to enable user authentication and protected routes.
β Clone Starter Code
git clone --single-branch --branch starter github.com/huntabyte/sveltekit-pocketbase-auth.git
π Final Code
github.com/huntabyte/sveltekit-pocketbase-auth
π½ Form Actions in SvelteKit
youtube.com/watch?v=52nXUwQWeKI
βͺ Previous Video (Layouts in SvelteKit)
youtu.be/jCzEJG2osNw
π Resources Mentioned In This Video
- Merge Users & Profiles Issue: github.com/pocketbase/pocketbase/issues/376
- PocketBase: pocketbase.io
- DaisyUI: daisyui.com
- TailwindCSS: tailwindcss.com
π Become a channel member: hbyt.us/join
π¬ Discord: hbyt.us/discord
π¦ Twitter: hbyt.us/twitter
π₯οΈ Setup Stuff: hbyt.us/gear
π Chapters:
00:00 - PocketBase Setup
02:30 - PocketBase Users Overview
04:15 - SvelteKit Starter Setup
05:55 - Starter App Overview
06:20 - Install PocketBase SDK
07:00 - How the PocketBase SDK Works
11:10 - Implement handle function
13:38 - Creating/Registering Users
19:12 - Logging In Users
21:10 - Using User Data in App
24:50 - Logging Out Users
29:00 - Protecting Auth Routes
__________________________________________
(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!)
UPDATED VIDEO (PocketBase v0.8+): youtu.be/vKqWED-aPMg
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. PocketBase is an open-source backend consisting of an embedded database (SQLite) with real-time subscriptions, built-in user management, convenient dashboard UI, and simple REST-ish API.
In this SvelteKit tutorial, I demonstrate how to integrate your SvelteKit application with PocketBase to enable user authentication and protected routes.
β Clone Starter Code
git clone --single-branch --branch starter github.com/huntabyte/sveltekit-pocketbase-auth.git
π Final Code
github.com/huntabyte/sveltekit-pocketbase-auth
π½ Form Actions in SvelteKit
youtube.com/watch?v=52nXUwQWeKI
βͺ Previous Video (Layouts in SvelteKit)
youtu.be/jCzEJG2osNw
π Resources Mentioned In This Video
- Merge Users & Profiles Issue: github.com/pocketbase/pocketbase/issues/376
- PocketBase: pocketbase.io
- DaisyUI: daisyui.com
- TailwindCSS: tailwindcss.com
π Become a channel member: hbyt.us/join
π¬ Discord: hbyt.us/discord
π¦ Twitter: hbyt.us/twitter
π₯οΈ Setup Stuff: hbyt.us/gear
π Chapters:
00:00 - PocketBase Setup
02:30 - PocketBase Users Overview
04:15 - SvelteKit Starter Setup
05:55 - Starter App Overview
06:20 - Install PocketBase SDK
07:00 - How the PocketBase SDK Works
11:10 - Implement handle function
13:38 - Creating/Registering Users
19:12 - Logging In Users
21:10 - Using User Data in App
24:50 - Logging Out Users
29:00 - Protecting Auth Routes
__________________________________________
(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!)










