feat(sso): redirect to login when auto-sign-on is enabled and user is not authenticated

This commit is contained in:
Sarah Vaupel 2024-03-14 19:20:37 +01:00
parent f3da2ac630
commit 2aa64f7360

View File

@ -156,6 +156,10 @@ siteLayout' overrideHeading widget = do
-- isParent r = r == (fst parents)
isAuth <- isJust <$> maybeAuthId
when (appAutoSignOn && not isAuth) $ do
$logDebugS "AutoSignOn" "AutoSignOn is enabled in AppSettings and user is not authenticated"
redirect $ AuthR LoginR
now <- liftIO getCurrentTime