Authstronomy: The Science of Authenticating Angular Apps
summary
Recommends against don't store tokens in local storage and instead keeps tokens in app memory with a session cookie for silent reissues; advocates the IETF PKCE code exchange flow (code verifier/challenge) to avoid URL-delivered tokens, with SDKs handling the steps. Shows concrete Angular tools: RxJS streams for auth state, HTTP interceptors to attach tokens, and route guards including canLoad to prevent lazy modules downloading. Practical demos and code patterns are described and validated.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:53Cookies
- 2:19How it works
- 3:19Why not cookies
- 3:54Securing with cookies
- 5:14Tokenbased authentication
- 5:43Local storage
- 6:57Session persistence
- 8:12OAuth2 guidance
- 13:06How does Angular help us
- 13:44Managing authentication events
- 14:42Creating authentication streams
- 15:19Conclusion
- 15:49HTTP Interceptors
- 16:14Provider Array
- 17:05Conditional Logic
- 17:39Asynchronous Authentication
- 19:05Route Guards
- 20:28CanActivate
- 21:28GuardLazyLoading
- 23:46Recap
related talks
26mThe Science of Authenticating Angular Apps
30mThe science of authenticating Angular apps
19mAngular's User Authentication Tool Belt
27mCookies versus tokens: a paradoxical choice
28mA Token Walks Into a SPA...
33mMake your Angular app a max security prison
30mStandards-based authentication for JavaScript sites
32mAngular and the OWASP top 10
