Setting up Google Auth

I have changed Google OAuth client & secret, is there anything that I have to do? I am getting below error. Please advise.

{
  "logLevel": "Error",
  "message": "Connection id \"0HLHOJVH8JD3C\", Request id \"0HLHOJVH8JD3C:00000008\": An unhandled exception was thrown by the application.",
  "eventId": {
    "id": 13,
    "name": "ApplicationError"
  },
  "connectionId": "0HLHOJVH8JD3C",
  "traceIdentifier": "0HLHOJVH8JD3C:00000008",
  "exception": {
    "type": "System.Exception",
    "message": "An error was encountered while handling the remote login.",
    "stackTrace": "   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()\r\n   at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync()\r\n   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)\r\n   at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)\r\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\r\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\r\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\r\n   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)\r\n   at Squidex.Pipeline.RequestLogPerformanceMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in src\\Squidex\\Pipeline\\RequestLogPerformanceMiddleware.cs:line 32\r\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Squidex.Pipeline.EnforceHttpsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in src\\Squidex\\Pipeline\\EnforceHttpsMiddleware.cs:line 29\r\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)\r\n   at Squidex.Pipeline.LocalCacheMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) in src\\Squidex\\Pipeline\\LocalCacheMiddleware.cs:line 30\r\n   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass5_1.<<UseMiddlewareInterface>b__1>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)"
  },
  "app": {
    "name": "Squidex",
    "version": "1.0.0.0",
    "sessionId": "50164c71-3194-4b18-93ce-4a2c0fb757c9"
  },
  "web": {
    "requestId": "44044f03-c5c3-42e5-8f51-cfb21edae38e",
    "requestPath": "/identity-server/signin-google",
    "requestMethod": "GET"
  },
  "timestamp": "2018-10-23T04:28:10.9634490Z",
  "category": "Microsoft.AspNetCore.Server.Kestrel"
}
``

Ìs there no other message? Usually you get something like “Invalid_redirect_url” or so.

Initially I got that message, I have added http://localhost:5000/identity-server/signin-google to the redirect list then I got above error message.

I have never seen it before. Is there something special in your setup? Proxies? VPN, Firewall, whatever?

Can you share your client id and secret with me, for example via PM?

Using in home network only, sent details to your email id. Let me know if you haven’t received it.

I got Ă­t, I will test it today.

1 Like

While debugging I got: An error occurred when retrieving Google user information (Forbidden). Please check if the authentication information is correct and the corresponding Google+ API is enabled.

it is documented here: https://docs.microsoft.com/en-US/aspnet/core/security/authentication/social/google-logins