cell_tower
Broadcast Station
visibility
4.3K views
schedule
2 years ago
visibility
4,304 views
thumb_up
119
comment
14
schedule
12:47
2023
2 years ago
MORE: https://lwj.dev/newsletter — The most tedious and difficult part of building a web app is authentication. But a new tool just entered the discussion that’s hoping to change that.
There are lots of options to get auth set up quickly, but they often aren't built to handle the more complex, enterprise features that you hope to grow into over time. In the other direction, user management that's powerful enough for a more mature company is usually so cumbersome and expensive to set up that it's borderline foolish to start with it.
AuthKit (https://www.authkit.com/) caught my attention because its stated intention is to fit the needs of early-stage companies as well as more mature, complex use cases. They have a hosted UI for getting full-featured user management set up in a few lines of code, plus they have a full SDK for building custom user management flows and adding enterprise features like SSO. I love this, because it lines up with my views on progressive disclosure of complexity in software: https://jason.energy/progressive-disclosure-of-complexity/
----------------------------------------------------------------------------------------------------------------------
Thank you to WorkOS for sponsoring this video! https://lwj.dev/workos
----------------------------------------------------------------------------------------------------------------------
## Resources and further reading
- AuthKit: https://www.authkit.com/
- WorkOS User Management: https://workos.com/docs/reference/user-management
- Radix: https://www.radix-ui.com/
- `jose` on npm: https://www.npmjs.com/package/jose
## Chapters
00:00 Auth is tedious to add to web apps
00:54 Enable AuthKit in the WorkOS dashboard
01:19 Cloning the repo, setting env vars, starting local dev server
03:01 Add working sign in / sign-up URLs to the Next app
05:05 Handle successful login in a Next.js API route
07:15 Add functions to verify and read token data
08:24 Protect routes using Next.js middleware
09:28 Show logged in user data in the UI
09:47 Allow logout with Next server actions
10:35 Update the home page based on login state
11:08 Customizing AuthKit UI and flows + adding SSO
11:58 Why I think AuthKit is worth considering
apparel
Vintage
steps
Sneakers
checkroom
Streetwear
sports_esports
Gaming
travel
Travel
chef_hat
Food
broadcast_on_home
Tech
child_care
Kids
sell
Reselling
sports
Sports
comedy_mask
Comedy
tv_guide
Entertainment
skateboarding
Skate
style
Cards
history_2
Retro
money_range
Business
headphones
Music
dictionary
Learn
rss_feed
News
wall_art
Art
landscape
Outdoors
newspaper
Docuseries
manga
Anime
sports_kabaddi
Wrestling
styler
Lifestyle
car_gear
Auto
supervisor_account
Reality
shopping_bag
Shopping
diamond
Luxury
military_tech
Military
borg
Sci-Fi
language_international
International
grass
Western
weather_hail
Weather
movie
Movie
car_gear
Engineering
casino
Gameshow
home_and_garden
Home
universal_local
Local
bath_soak
Relaxation
More to Watch
11:24
How Companies are Using AI to SCAM People
23.8K views • 3 years ago
2:47:05
Web dev, career talk, tech chat
907 views • 2 years ago
13:07
The Truth About Sora 2 (Nobody’s Saying This)
64K views • 1 year ago
1:29:40
Let's Learn Ember.js
7.1K views • 2 years ago
19:30
Microsoft Copilot Pro (An HONEST Review)
138.5K views • 2 years ago
30:53
AI News: This Video Model Has Everyone Freaked Out!
110.2K views • 8 months ago
