Authentication and Session Management in FastBoot
summary
Demonstrates that FastBoot needs the auth token on the server for initial render and solves it by storing the token as a cookie so the server can forward it to the API, using the ember-cookies abstraction to read cookies both in Node and the browser. Uses an HTTP-only cookie set by the API (no JS access), nginx to share domains, FastBoot reads the cookie and sends an Authorization header, unauthenticated loads become 307 redirects, demo runs locally but the GitHub example branch wasn’t pushed yet, watch for CSRF with cookie auth.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:03Authentication basics
- 3:15Token-based auth without FastBoot
- 5:03What is FastBoot
- 6:29FastBoot auth flow
- 8:15Session cookies in FastBoot
- 10:23ember-cookies addon
- 11:07Live demo setup
- 13:14Demo authentication
- 14:16Cookie flags and domains
- 16:06Fixed domain example
- 17:07Simplified session service
- 18:32FastBoot vs browser logic
- 20:47Cross-site request forgery
- 23:58FastBoot security notes
- 24:41Summary and wrap-up
