Is it possible to get rid of GET /auth/logout = getLogoutR? or change its behavior? similar to the loginHandler in the YesodAuth
Basically, I want to prevent somebody to send a link to naive users that will logout them.
Is it possible to get rid of GET /auth/logout = getLogoutR? or change its behavior? similar to the loginHandler in the YesodAuth
Basically, I want to prevent somebody to send a link to naive users that will logout them.
One thing (not tested) which will likely work is adding a definition for it in the Yesod instance. Something like this:
instance Yesod App where
isAuthorized (AuthR LogoutR) False = return $ Unauthorized "must be admin"
The False is to make sure that it will only operate on GET request.