The Science of Authenticating Angular Apps
summary
Compares cookie sessions (use when front end and API share a domain) versus token APIs (use when APIs are cross‑domain) and recommends the IETF best practice of Authorization Code with PKCE instead of tokens in URL. Warns don't store tokens in localStorage and instead keep tokens in memory and use the auth server cookie to silently obtain new tokens. Shows concrete Angular implementations: RxJS streams for auth state, HTTP interceptors & route guards (canActivate, canLoad) and guarded lazy loading.
AI-written summary · about
chapters (10)
- 0:00Introduction to authentication
- 1:12Cookie-based authentication
- 4:06Token-based authentication
- 6:39Token storage security
- 9:05Modern token exchange flows
- 14:47Angular authentication to-do list
- 15:28Managing auth events with RxJS
- 17:17Sending tokens with HTTP interceptors
- 20:10Restricting routes with guards
- 25:10Summary and resources
related talks
25mAuthstronomy: The Science of Authenticating Angular Apps
30mThe science of authenticating Angular apps
27mCookies versus tokens: a paradoxical choice
19mAngular's User Authentication Tool Belt
30mStandards-based authentication for JavaScript sites
44mThe Art of Authentication for Web Apps
59mSecuring Web APIs from JavaScript/SPA Applications
33mMake your Angular app a max security prison
