This chapter talked about the many aspects of security. Here, we learned how to make our application more secure and resilient to attacks.
We understood the use of authorization attributes to protect sensitive resources of your application. It's better to use policies than actual named claims or roles because it's so much easier to change a policy configuration, and you can do pretty much everything.
Then, we saw how to use identity for authentication rather than rolling out your own mechanism. If your requirements so allow it, use social logins, as this is probably widely accepted since most people use social networking apps.
Be careful with binding sensitive data to your model; prevent it from happening automatically and use different models for MVC and the actual data storage. We saw that we always HTML-encode data that comes from a database, to prevent the possibility that a malicious user has inserted JavaScript into it.
We...