OAuth2 authorization flow

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

  1. The user asks the web application to login with the external provider X.
  2. The web application prompts the user with a pop-up window containing a page directly hosted by the external provider X, from which they can do the following:
    • Login to X to authenticate themselves there, unless they're not logged in there
    • If/when logged in, authorize the web application to use X as the third-party authentication provider, thus giving it access to the minimum amount of required user information (name, email, and so on) to allow that
  3. If the user refuses to either log in to X or to give X the authorization, ...

Get ASP.NET Core 2 and Angular 5 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.