Created
April 19, 2020 19:09
-
-
Save steliodibello/5e3ace22ced70014b39a507645dba192 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
//This snippet goes into sitecore/login/default.aspx | |
protected override void OnPreInit(EventArgs e) | |
{ | |
if (Request.Cookies[".AspNet.Cookies"] != null) | |
{ | |
//Force expiration of SSO cookie on .yourclient.com domain | |
HttpCookie myCookie = new HttpCookie(".AspNet.Cookies"); | |
myCookie.Expires = DateTime.Now.AddDays(-1d); | |
myCookie.Domain = "yourclient.com"; // !!!! | |
Response.Cookies.Add(myCookie); | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment