You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default this calls defaultLoginHandler, which concatenates plugin widgets and wraps the result in authLayout. Override if you need fancy widget containers, additional functionality, or an entirely custom page. For example, in some applications you may want to prevent the login page being displayed for a user who is already logged in, even if the URL is visited explicitly; this can be done by overriding loginHandler in your instance declaration with something like:
instance YesodAuth App where
...
loginHandler = do
ma <- lift maybeAuthId
when (isJust ma) $
lift $ redirect HomeR -- or any other Handler code you want
defaultLoginHandler
But this does not work for me. Instead I found this to work:
loginHandler :: AuthHandler App Html
loginHandler = do
ma <- maybeAuthId
when (isJust ma) $ redirect HomeR
defaultLoginHandler
The text was updated successfully, but these errors were encountered:
In the docs it says:
But this does not work for me. Instead I found this to work:
The text was updated successfully, but these errors were encountered: