I am making an SSO application with user management in MVC 5, but I cannot share a cookie between applications, for example
http: // sso http: // app
different sites in IIS, I think it is something like a cross domain, so in app2, when I have something like this in startup.auth
app.UseCookieAuthentication(new CookieAuthenticationOptions { CookieName = "sharedcookie", CookieDomain = "SSO", CookieHttpOnly = false, //CookieDomain = "localhost", AuthenticationType = DefaultAuthenticationTypes.ExternalCookie, LoginPath = new PathString("/Account/Login"), Provider = new CookieAuthenticationProvider { external login to your account. OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>( validateInterval: TimeSpan.FromMinutes(30), regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager)) } });
UPDATE: thanks to Chris Pratt for answering that there is no way to do this, which will lead me to another question that can I share a cookie between
name1.domain.com/app1 and name2.domain.com/app2
With owin
cookies asp.net-mvc owin shared single-sign-on
zeuz1983
source share