The science of authenticating Angular apps
summary
Explains concrete recommendations: use PKCE code flow so the browser receives a harmless code then redeems it for tokens, avoid don't store tokens in localStorage and keep tokens in memory while using an auth-server session cookie to silently refresh, use RxJS observables and available SDKs to wrap callbacks/promises, attach tokens with HTTP interceptors, and protect routes with guards including CanLoad to prevent lazy modules from downloading when unauthorised; ag-Grid is listed as sponsor.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:13Authentication
- 4:24Why not cookies
- 5:09Crossorigin
- 7:05Tokens
- 10:16OAuth 20 history
- 15:31Should you use OAuth 20
- 16:17How does Angular help
- 17:08Managing authentication events
- 19:55Sending the token with API requests
- 23:35Route guards
related talks
25mAuthstronomy: The Science of Authenticating Angular Apps
26mThe Science of Authenticating Angular Apps
33mMake your Angular app a max security prison
30mStandards-based authentication for JavaScript sites
19mAngular's User Authentication Tool Belt
32mAngular and the OWASP top 10
17mThere's Safety in Angular
39mLogin and Access Control in Angular
