This project has moved and is read-only. For the latest updates, please go here.

".AspNet.Correlation.Google cookie not found."

Aug 7, 2015 at 9:36 PM
Hello, I'm using .net. 4.5.2 and latest version on Identity in my application.
There are cases I get strange error from external login ".AspNet.Correlation.Google cookie not found."

In the logs I see the the I see the url "/signin-google?state=STATE FROM GOOGLE" but "AuthenticationManager.GetExternalLoginInfoAsync" returns NULL and my logs showing the error I mentioned.

This is my configurations:
 var cookieOptions = new CookieAuthenticationOptions
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login"),
                CookieName = ".myApp",
CookieDomain = ""
                CookieHttpOnly = true,
                SlidingExpiration = false,
                Provider = new CookieAuthenticationProvider
                    OnResponseSignOut = (context) =>
                        //remove user cache
                    OnResponseSignIn = context =>
                        //add token to claims

                    OnException = (context) =>
                        //prevent exception display
                    OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<UserManager, User, int>(
                        validateInterval: TimeSpan.FromMinutes(IdentityExpiresIn),
                        regenerateIdentityCallback: (manager, user) =>
                            var identity = manager.CreateIdentityAsync(user,
                            return identity;
                        getUserIdCallback: (id) => (id.GetUserId<int>()))


  var googleOAuth2AuthenticationOptions = new GoogleOAuth2AuthenticationOptions()
                ClientId = Wishiz.Configuration.AppSettings.Get<string>("GoogleAppID"),
                ClientSecret = Wishiz.Configuration.AppSettings.Get<string>("GoogleAppSecret"),
                SignInAsAuthenticationType = DefaultAuthenticationTypes.ExternalCookie,

The issue happens usually when using mobile devices and Chrome (cookies are supported)
Aug 7, 2015 at 9:44 PM
Shouldn't there also be a 'code' parameter in that url? This may be related to
Aug 8, 2015 at 2:32 PM
There was code parameter. I removed it for this presentstion
Aug 25, 2015 at 2:37 PM
Any insights?
Aug 25, 2015 at 2:40 PM
Aug 25, 2015 at 2:43 PM
I already implemented this solution and still have this issue. I must say it's not only Google, I have the same issue with Facebook correlation cookie