/google-incremental-auth-sample

Sample ASP.NET Core web apps that demonstrate asking for authorization incrementally

Primary LanguageC#

Google Incremental Authorization Samples

These sample ASP.NET Core 2.1 web apps demonstrate incremental authorization to Google services. Google recommends requesting scopes only as needed, especially if the consent screen with all scopes is overwhelming. This is often the case with educational apps which require consent from students.

  1. GoogleIncrementalMvcSample uses the Google APIs Client Library for .NET with a small custom library to support ASP.NET Core. This sample follows the example shown for Web Apps on the OAuth 2.0 Authentication and Authorization page.
  2. MicrosoftIncrementalMvcSample uses Microsoft's ASP.NET Core OAuth2 middleware to acquire the tokens, and Google APIs Client Library for .NET to use Google Services.
  3. OpenIdConnectIncrementalMvcSample uses Microsoft's ASP.NET Core OpenID Connect middleware to authenticate the user, OAuth 2 middleware to get authorization from the user to access their classes, and Google APIs Client Library for .NET to use Google Services.