I am trying to access Google Drive from an ASP.NET MVC application, and started off with this sample by Linda Lawton (one of the contributors to the Google .NET client library).
The sample works fine when run in Visual Studio, but not when deployed to a test site. Here's what happens...
I click on the navbar link to the "List files" page, which will then require authentication.
I get the oAuth screen (whose URL starts
https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount) where I have to pick a Google userI get a consent screen, where I ahve to confirm that I want to app to access my Google Drive
I then get redirected to
http://example.com/signin-oidc- note that this is not secure, so Edge gives me a warning about this. It doesn't matter if I add thehttpsversion of the redirect URI to the credentials, it always redirects to the non-secure oneIf I proceed anyway, I get sent to
https://example.com/signin-oidc, where I see the following...
Exception: An error was encountered while handling the remote login. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync() Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Anyone any ideas what's going wrong here?
Thanks