External authentication providers

Now that we finally have a fully-featured, JWT-based internal authentication provider, we can start thinking about supporting other login alternatives. Hooking up some external authentication providers such as Google, Facebook, and Twitter will undoubtedly please our users and increase our application's overall appeal.

Luckily enough, AspNetCore.Identity comes bundled with a built-in set of middleware classes for the most used OAuth2 providers that will simplify each of these tasks.

OAuth2 authorization flow

Before we start, let's do a quick recap of how the OAuth2 authorization flow actually works:

OAuth2 authorization flow

This, in short, ...

Get ASP.NET Core: Cloud-ready, Enterprise Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.