ASP.NET Identity Cookie across subdomains

In Startup.Auth.cs, you will see something like:

for RC:


This was removed in RTM and replaced with the explicit configuration of the cookie auth:

    app.UseCookieAuthentication(new CookieAuthenticationOptions {
        AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
        LoginPath = new PathString("/Account/Login")

The CookieAuthenticationOptions class has a CookieDomain property which is what you are looking for I believe.

Leave a Comment