
Explore ASP.NET Core Identity and security to build secure user-facing apps with authentication, authorization, and identity, including MFA and JWT bearer authentication, plus production hardening and external providers.
Explore authentication, authorization, and identity in ASP.NET Core Identity, covering credentials, multi-factor options, passkeys, tokens, and how roles, policies, and claims control access.
Avoid building authentication from scratch by using ASP.NET Core Identity, which provides password hashing, email confirmation, account activation, brute force protection, and claims, roles, and authorization.
Explore setting up a classifieds web app with data and web projects, scaffolded pages, and seeding, then learn to add identity and cookie authentication.
Add cookie authentication to your ASP.NET Core app by configuring services, enabling use authentication before use authorization, and selectively applying authorize or allow anonymous on pages.
Explore cookie-based authentication in ASP.NET Core Identity, customize login paths, handle return URLs, build a login form with claims and sign-in logic, and implement remember-me and local redirects.
Explore how identity claims and the principal drive authenticated sessions, display the logged-in user's username, and adapt the navigation based on authentication state. Implement a login partial, configure cookie-based authentication, and use claims such as identity.name to render the correct display name and sign out.
Implement third-party authentication by wiring open ID providers such as Google, Twitter, Facebook, and Microsoft in startup, and securely store their keys using user secrets.
Master ASP.NET Core identity basics by reviewing startup authentication setup, cookie-based sign-in, global authorization, and claims-based access, including third-party options and secure secrets management.
Explore the ASP.NET Core Identity core library to manage users, roles, claims, and cookies, and scaffold authentication and authorization with out-of-the-box features for individual accounts.
Retrofit an existing app with ASP.NET Core identity by adding default identity, configuring password options, extending the user with custom fields, and migrating the database.
Learn how to enable secure registration with ASP.NET Core Identity by scaffolding the register page, wiring the data context, and testing registration against the database.
Learn how to extend secure registration in ASP.NET Core MVC using identity: add username and fields, validate input, hash passwords, and enable email confirmation.
Implement and register an SMTP-based email sender to handle registration verification, password resets, and notifications, and test with a local SMTP server using startup dependency injection.
Extend ASP.NET Core Identity with a custom password validator to enforce business rules and strengthen password security, by adding validations in the identity pipeline and optionally integrating third-party checks.
Extend the user class with identity and custom fields, configure a dedicated identity db context, run migrations, and implement email sending and razor pages for authentication features.
Explore authentication essentials in ASP.NET Core Identity, configuring login, password security, session and cookie management, and exploring how third party libraries use user manager, including multifactor authentication.
Implement secure login using ASP.NET Core Identity, scaffolding login with user manager and sign in manager, handle username versus email, cookies, return URL, and basic security best practices.
Learn to handle logout flow in ASP.NET Core Identity by redirecting to the homepage after sign-out, using on post logic and a return URL.
Implement password reset flows in ASP.NET Core Identity by sending reset tokens via email, validating user existence and token, and guiding users through forgot and reset password pages.
Implement account locking in ASP.NET Core Identity to block a user after three failed attempts for five minutes, enhancing security against brute force attacks. Configure lockout options and email notifications.
Enable two-factor authentication through the manage page, set up an authenticator app (Microsoft or Google) via a QR code, and use recovery codes for access.
Review how scaffolding and sign-in manager upgrades ASP.NET Core Identity security, including password resets via email, and extend the identity pipeline with custom password and role validators.
Explore how authorization and authentication work in dot net core applications, from global authorization filters to anonymous exemptions, and learn how roles, claims, and policies combine to create secure applications.
Explore basic authorization in ASP.NET Core Identity across Razor Pages, MVC, and Blazor, using global and page-level rules, with administrator roles controlling category creation while ads remain accessible.
Seed roles and assign them to users in asp.net core identity, using role seed configurations, migrations, and usermanager.addtoroleasync for administrator and customer roles.
Implement role-based authorization in ASP.NET Core to restrict categories to administrators and allow customers to create ads, with admins handling edit and delete actions.
Learn to add custom claims to users in asp.net core identity with a claims principal factory, override generate claims async, and store name, email, role, and minimum age in cookie.
Learn to use claims-based authorization to protect endpoints by checking a user's minimum age, accessing claims from the user context, and redirecting to access denied when needed.
define and enforce policies based on claims in startup via policy-based authorization. learn to add policies, set required claims like minimum age, and test with global and page-specific authorization.
Review covers basic authorization, global authorize filters, and policy-based access using claims; implement role assignment and claims to control user privileges and secure the application.
Explore OpenID Connect to verify user identity via an authorization server and profile data, then implement Google as the identity provider and integrate its key and secret into your app.
Obtain Google OAuth credentials by signing in, creating an OAuth client ID for a web application, and securely using the client ID and secret in your app.
Add Google authentication to an ASP.NET Core app by configuring startup services, securely storing client id and secret with user secrets, and surfacing the Google login button.
Test Google login flow in ASP.NET Core Identity by clicking Google login, fix 400 by updating the authorized redirect URI, and verify Google login in the database.
Set up Google authentication and other third party providers by registering a web client, obtaining credentials, configuring redirect URLs, storing app secrets, and wiring to scaffolded login.
Learn to implement authentication and authorization in your core application, balance security with usability, and extend and compose what comes out of the box to build a secure, usable app.
Overview
In this course, you will learn the basics of modern authentication using the ASP.NET Core Identity Library and learn to extend the functionality relative to our specific business needs. While perfect security is arguably impossible to achieve, we will explore various techniques that go a long way in ensuring security and relative ease of use simultaneously. We will look at implementing security in a practical ASP.NET Core application and how we can implement role, claim, and custom policy-based authorization.
Why ASP.NET Identity Core
Authorization, Authentication, and User Management are mainstay features in real-world applications. Identity Core is the flagship library packaged with ASP.NET Core projects to help us get the most security possible. Getting authentication and authorization done right on your website can help keep your users and their data safe from attacks. Added features such as Two and Multi-Factor Authentication are relatively easy to plug in, and this library can easily be extended to implement unique business rules to surround how users are treated.
Everything in this course is .NET 6 / .NET 7 compatible.
Build A Strong Foundation in ASP.NET Core Security:
Learn how to add Cookie Authentication manually to an ASP.NET Core application
How to properly implement User Roles, Claims, and Policies
Learn how to use, build and manage User Claims
Learn to implement user authentication and registration processes properly
Learn password policies and recovery
Learn to setup Emailing features for secure Account Confirmation, Forgot Password, and other processes
Learn to add authorization and user restrictions
Learn to Add Two and Multi-factor Authentication
Learn Modern Authentication Methods (Social logins, OAuth, etc.)
Even though the fundamentals of the security principles will be demonstrated with a Razor Pages application, all techniques and considerations can be taken in any ASP.NET Core application type, including MVC and Blazor.
It has content for developers at all levels, as there is always time/early to start thinking about the best security practices for your web application.
Content and Overview
To take this course, you must have some knowledge of .NET Core development and C#.
This course has just over 5 hours of premium content, smartly broken up to highlight related activities based on each module in the application being built. We will also look at troubleshooting and debugging errors as we go along, implementing best practices, writing efficient logic, and understanding why developers do things the way they do. Your knowledge will grow, step by step, throughout the course, and you will be challenged to be the best you can be.
We don't always do things the perfect way the first time; that is not the reality of writing code. We make mistakes and point them out and fix them around them. By doing this, we develop proficiency in using debugging tools and techniques. By the time you have finished the course, you will have moved around in Visual Studio and examined logic and syntax errors so much that it will be second nature for you when working in the .NET environment. This will put your newly learned skills into practical use and impress your boss and coworkers.
The course is complete with working files hosted on GitHub, including some files to make it easier for you to replicate the demonstrated code. You will be able to work alongside the author as you work through each lecture and will receive a verifiable certificate of completion upon finishing the course.