MSDN:- ASP.NET Core provides many tools and libraries to secure your apps including built-in identity providers, but you can use third-party identity services such as Facebook, Twitter, and LinkedIn. With ASP.NET Core, you can easily manage app secrets, which are a way to store and use confidential information without having to expose it in the code.
The following are the best practices recommended to avoid vulnerabilities in your applications:
  • Cross-Site Scripting (XSS)
  • SQL Injection
  • Cross-Site Request Forgery (CSRF)
  • Custom Error Page for Error Handling
  • Version Discloser
  • Enforce SSL (Secure Sockets Layer) and HSTS
  • XXE (XML External Entity) Attack
  • Improper Authentication and Session Management
  • Sensitive Data Exposure and Audit Trail
  • File Upload Validation