@@ -36,7 +36,7 @@ import Data.Time (UTCTime, addUTCTime, diffUTCTime, getCur
3636import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds , posixSecondsToUTCTime )
3737import Data.UserId (UserId (.. ), rUserId , succUserId , unUserId )
3838import Happstack.Authenticate.Core
39- import Happstack.Server (Cookie (httpOnly , sameSite , secure ), CookieLife (Session , MaxAge ), Happstack , Method (GET , HEAD ), SameSite (SameSiteStrict ), ServerPartT , Request (rqSecure ), Response , addCookie , askRq , expireCookie , getHeaderM , lookCookie , lookCookieValue , method , mkCookie , notFound , resp , toResponseBS )
39+ import Happstack.Server (Cookie (httpOnly , sameSite , secure ), CookieLife (Session , MaxAge ), Happstack , Method (GET , HEAD ), SameSite (SameSiteLax ), ServerPartT , Request (rqSecure ), Response , addCookie , askRq , expireCookie , getHeaderM , lookCookie , lookCookieValue , method , mkCookie , notFound , resp , toResponseBS )
4040import GHC.Generics (Generic )
4141import Prelude hiding ((.) , id , exp )
4242import System.IO (IOMode (ReadMode ), withFile )
@@ -452,7 +452,7 @@ addTokenCookie :: (Happstack m) =>
452452addTokenCookie authenticateState authenticateConfig user =
453453 do token <- issueToken authenticateState authenticateConfig user
454454 s <- rqSecure <$> askRq -- FIXME: this isn't that accurate in the face of proxies
455- addCookie (MaxAge (60 * 60 * 24 * 30 )) ((mkCookie authCookieName (Text. unpack token)) { sameSite = SameSiteStrict , secure = s, httpOnly = True })
455+ addCookie (MaxAge (60 * 60 * 24 * 30 )) ((mkCookie authCookieName (Text. unpack token)) { sameSite = SameSiteLax , secure = s, httpOnly = True })
456456 return ()
457457
458458-- | delete the `Token` `Cookie`
0 commit comments