Adding external provider authentication

In the following section, we will showcase external provider authentication by using Facebook as an authentication provider.

Here is an overview of the control flow in this case:

  1. The user clicks on a dedicated external provider login button.
  2. The corresponding controller receives a request indicating which provider is needed, then a challenge is initiated with the external provider.
  3. The external provider sends an HTTP callback (POST or GET) with a provider name, a key, and some user claims for the application.
  4. The claims are matched with the internal application user.
  5. If no internal user can be matched with the claims, the user is either redirected to a specific registration form or is rejected.

Get Learning ASP.NET Core 2.0 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.