SvelteKit Authentication with PocketBase @Huntabyte
SvelteKit Authentication with PocketBase  @Huntabyte
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!)
SvelteKit Authentication with PocketBaseSvelte 5s Secret Weapon: Classes + ContextLive Code & Chill - Custom Form BuilderLets Build a Custom GPT-3 AI ApplicationLive - Researching SvelteKit, Supabase, & Prisma IntegrationDynamic Routes & Slugs with Route ParamsMore date picker thingsPractical Svelte 5 - Shopping CartPass Messages between Pages in SvelteKitLive Code & Chill - SvelteKit, Supabase, Prisma, & SkeletonUIBetter Protected Route RedirectsLive Code & Chill - Adding Directus as CMS (SvelteKit, Supabase, Stripe)
Huntabyte |

SvelteKit Authentication with PocketBase

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER