From 94d1d38bca8a7f4b6a66ca3cfd523df995961ce5 Mon Sep 17 00:00:00 2001 From: Loic Denuziere Date: Fri, 23 Feb 2018 20:40:49 +0100 Subject: [PATCH] Fix #20 Add cookie domain in UserSession.Logout() --- WebSharper.Owin/Owin.Sitelets.fs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WebSharper.Owin/Owin.Sitelets.fs b/WebSharper.Owin/Owin.Sitelets.fs index 6a2d7ab..61f4800 100644 --- a/WebSharper.Owin/Owin.Sitelets.fs +++ b/WebSharper.Owin/Owin.Sitelets.fs @@ -163,8 +163,13 @@ module private Internal = member this.Logout() = async { - ctx.Response.Cookies.Append(FormsAuthentication.FormsCookieName, "", - CookieOptions(Expires = Nullable(DateTime.Now.AddDays(-1.)))) + ctx.Response.Cookies.Append( + FormsAuthentication.FormsCookieName, "", + CookieOptions( + Expires = Nullable(DateTime.Now.AddDays(-1.)), + Domain = FormsAuthentication.CookieDomain + ) + ) return refresh null }