ASP.NET Core 2.0 Google OAuth Redirection – Add Hosted Domain and other parameters

Adding a hosted domain parameter is not directly supposed through the GoogleOptions class, unfortunately – however with a few (not obvious) tweaks, you can easily add the parameter!   In your Startup.cs, set up a new Events parameter as such:   services.AddAuthentication().AddGoogle(googleOptions => { const string hostedDomain = “kerryritter.com”; googleOptions.ClientId = Configuration[“Google:ClientId”]; googleOptions.ClientSecret = Configuration[“Google:ClientSecret”];…