Sanitize & Encrypt Password Login with AngularJS

I want to sanitize my login form input and encrypt passwords to avoid script injections.

Info: $sanitize is a service provided by AngularJS that can be used to protect against injection attacks when you inject HTML into a web page.



Encrypt password and token

This will protect against script injections but now you might want to also encrypt you passwords and tokens so they are sent obfuscated. So this is how you might encrypt your username and password with AngularJS.

Todo: add the best way to do this… any ideas???

Sam is a passionate web developer from England. In his spare time he enjoys coding, playing chess, reading and investing.

One thought on “Sanitize & Encrypt Password Login with AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *