Introduction

Completed

This module explores how to use ASP.NET Core Identity to support authentication and authorization in an ASP.NET Core Razor Pages web app.

Note

This module uses the .NET CLI (command line interface) and Visual Studio Code or GitHub Codespaces. After completing this module, you can apply its concepts using a development environment like Visual Studio (Windows), Visual Studio for Mac (macOS), or continue development using Visual Studio Code (Windows, Linux, and macOS).

In this module, you will:

  • Configure Identity support in an existing ASP.NET Core web app.
  • Provide new user registration capabilities.
  • Extend Identity UI components.
  • Customize multifactor sign-in capabilities.
  • Implement policy-based authorization using claims.
  • Customize and extend the underlying Identity data store.

Prerequisites

  • Experience writing C# at the beginner level
  • Experience using relational databases and SQL as a developer
  • Familiarity with Entity Framework (EF) Core migrations
  • Ability to write Razor at the beginner level
  • Familiarity with a time-based one-time password (TOTP) authenticator app, such as Microsoft Authenticator (available in the Google Play Store or the Apple App Store)

Required tools

It is recommended that you complete this module in GitHub Codespaces. No tools are required, but you need a free GitHub account.

If you prefer to use a local development environment, you use the same Dev Container as GitHub Codespaces by installing the following tools:

Finally, if you prefer to use no containerization, you must install the following tools:

Get started

In the next unit, you'll learn about ASP.NET Core Identity architecture.