Advanced AngularLesson 41Free preview
Angular Security
This lesson is part of Angular · All levels
Summary
Angular application security includes protection from XSS with built-in sanitizers, the use of HTTPS, as well as proper authentication token handling. Angular changes the malicious value on the binding so that most XSS is closed, but you have to be careful when using bypassSecurityTrust. Keep the token safe and don't keep secrets in the front code.
Key points
- Angular sanitizers protect binding from harmful content
- Avoid bypassing SecurityTrustHtml unless absolutely necessary
- Keep credentials and confidentiality on the server, not on the frontend bundle
- Use HTTPS, expiry tokens, and guard routes to authenticate
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.