I set up several test sites for SSO using IdentityServer3, pretty much the cookie cutter sample apps with minor virations. They work well except one thing: When trying to single sign OUT and/or update claims via cookie, it only works if all apps are on the same machine.
For example, these two apps can single sign out.
http://localhost:81
http://localhost:82
Claims updated in one app using the following also show up in the other.
var authenticationManager = HttpContext.Current.GetOwinContext().Authentication;
authenticationManager.AuthenticationResponseGrant =
new AuthenticationResponseGrant(new ClaimsPrincipal(identity),
new AuthenticationProperties { IsPersistent = false });
It also works if I configure the apps like this:
http://mymachine/app1
http://mymachine/app2
But if I mix the two
http://localhost:81
http://mymachine/app2
Then it won't work. Tried SignOut/SignIn too, same result. They still single sign on, but can't sign out together. Change in claims won't show in the other. Of course, same if I deploy the app to different servers. As if the cookies update happened at local machine, rather than on IdSvr.
Any hint what I missed? Thanks.