User Authentication with Pocketbase and SvelteKit | Full Auth Solution
Consulting Ninja
View ChannelAbout
I am here to help as MANY others as possible with web development, software development, and consulting related obstacles and issues. I love development, technology, consulting and want to build a positive community of developers (front, back , middle, scripts, everyone!) and tech lovers helping each other and building each other up to become better! I hope to see you soon! My channel membership is live now you can check that out here: https://www.youtube.com/channel/UCwPrPv9eS7Xgfp_wi7uxt0g/join I hope to see you in one of my live stream meet ups! * FYI * No StackOverflow behavior will be tolerated in my channel. Give positive advice and clear feedback without talking down to those that don't know please.
Latest Posts
Video Description
This is part 6 in the PocketBase series. In this video I show how to implement user authentication using PocketBase and SvelteKit. This is a full authentication solution. I first show how to register a user. Then we setup our hooks.server file to keep our authentication up to date and send user information to all our routes through locals using ( PocketBases built in methods exportToCookie, loadFromCookie, and authRefresh functions). Then we log a user in using a login route and PocketBases authWithPassword on the user collection. Then we move to a protected route that only allows access to authenticated users and also pulls out some user info to display it. Lastly I show how to implement a logout button. On the way I also cover removing pre-load on the links to prevent errors on the auth and logout routes! Lots of good stuff in this one! I hope that you find this helpful! My channel membership is live check it out here!: https://www.youtube.com/channel/UCwPrPv9eS7Xgfp_wi7uxt0g/join Membership perk video: https://youtu.be/FJgKifAThdU Need help? visit https://www.consultingninja.tech Check out my channel @ConsultingNinja for more videos like these. Source Code Available Here: https://github.com/consultingninja/pbKitUserAuth PocketBase Increase Security when using http (Part 5) Here: https://youtu.be/k57AqzqhiDY PocketBase Realtime DB Subscriptions Video (Part 4) Here: https://youtu.be/5-1HLCXRBPM PocketBase Google Auth App Video (Part 3) Here: https://youtu.be/Ig_RMc0GFw4 PocketBase CRUD App Video (Part 2) Here: https://youtu.be/Zm_DIu0MaBs PocketBase Overview & Setup Video (Part 1) Here: https://youtu.be/NuLua3EXXVQ PocketBase Docs: https://pocketbase.io/docs/ PocketBase JavaScript SDK: https://github.com/pocketbase/js-sdk
Boost Your Dev Setup
AI-recommended products based on this video

Wireless CarPlay Adapter for iPhone, Convert Wired to Wireless CarPlay Adapter, Mini Size with Extension Cable USB & USB-C/Type-C, Stable Car Control & No Delay, Black

Surge Protector Power Bar, SUPERDANNY 6 Ft Extension Cord with 8 Outlets & 4USB Ports (2 USB 2 C), Mountable Flat Plug Power Strip, Surge Protection for Home, Office, Dorm

Selfie Stick, 7 Section Adjustable Action Camera Extension Pole with 1/4in Thread and Screw Hole, 23.5 to 120cm Portable Extension Rod for Panoramic Camera

