AspNetCore.Correlation.Google cookie not found

See original GitHub issue

After upgrading from 3.0 to 3.1 I have issues with the Google authentication. I have no cookie policy registered and this is how my authentication configuration looks like:

services
          .AddAuthentication(options =>
          {
            options.DefaultScheme = IdentityConstants.ApplicationScheme;
            options.DefaultSignInScheme = IdentityConstants.ExternalScheme;
          })
          .AddGoogle(options =>
          {
            options.ClientId = _configurationOptions.Google.ClientId;
            options.ClientSecret = _configurationOptions.Google.ClientSecret;
            options.Scope.Add("https://www.googleapis.com/auth/userinfo.profile");
            options.SaveTokens = true;
          })
        .AddIdentityCookies(options =>
        {
          options.ApplicationCookie.Configure(a =>
          {
            a.Cookie.Name = ".AspNet.SharedCookie";
            a.Cookie.Domain = _configurationOptions.Domain;
          });
        });

And this is the error I get:

warn: Microsoft.AspNetCore.Authentication.Google.GoogleHandler[15]
      '.AspNetCore.Correlation.Google.611LD72jlzagvpKikBe8B41IqHTqrvVnXZdWS9iuZd8' cookie not found.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLRR2LP0DVR7", Request id "0HLRR2LP0DVR7:00000001": An unhandled exception was thrown by the application.
System.Exception: An error was encountered while handling the remote login.
 ---> System.Exception: Correlation failed.
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)```

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
Tratchercommented, Dec 16, 2019

new IPNetwork(IPAddress.Parse("172.16.1.0"), 24) should also work in 3.0+.

0reactions
analogrelaycommented, Dec 16, 2019

Closing, as this appears to be resolved. Let us know if that’s not the case and we can continue investigating!

Read more comments on GitHub >

github_iconTop Results From Across the Web

OIDC login fails with 'Correlation failed' - 'cookie not found ...
For me, Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler was logging this error: '".AspNetCore.Correlation.
Read more >
Correlation failed, cookies not found using OpenID in ASP. ...
I am getting the below error in my ASP.net core MVC 6 application, my application is using Keycloak and is running in a...
Read more >
Troubleshooting 'Cookie Not Found...Correlation Failed ...
I moved all of my B2C settings and Startup configuration methods as-is, upgraded my Microsoft.AspNetCore.Authentication.AzureADB2C.UI NuGet ...
Read more >
Correlation failed - Cookie not found
Hi, So my application has been using Auth0 for quite sometime now, everything was working fine for the past year until this week....
Read more >
Exception: Correlation failed. - Prateek Gangwar - Medium
This exception keeps occurring while working on a web application using ASP.NET Core. Just to add a little background, I am doing authentication...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found