Change the login form to a Bootstrapped one - still needs some colours tweaked though
This commit is contained in:
parent
f934632484
commit
ea47fb8b50
3 changed files with 33 additions and 2 deletions
|
@ -12,7 +12,7 @@ import Database.Persist.Sql (ConnectionPool, runSqlPool)
|
|||
import Text.Hamlet (hamletFile)
|
||||
import Text.Jasmine (minifym)
|
||||
|
||||
import Yesod.Auth.HashDB (authHashDB)
|
||||
import Yesod.Auth.HashDB (authHashDBWithForm)
|
||||
import qualified Yesod.Auth.Message as AuthMsg
|
||||
|
||||
import Yesod.Default.Util (addStaticContentExternal)
|
||||
|
@ -182,7 +182,11 @@ instance YesodAuth App where
|
|||
toResult = UserError AuthMsg.InvalidLogin `maybe` (Authenticated . entityKey)
|
||||
|
||||
-- You can add other plugins like Google Email, email or OAuth here
|
||||
authPlugins _ = [authHashDB (Just . UniqueUser)]
|
||||
authPlugins _ = [authHashDBWithForm loginForm (Just . UniqueUser)]
|
||||
where loginForm :: Route App -> Widget
|
||||
loginForm action = do
|
||||
mtok <- reqToken <$> getRequest
|
||||
$(widgetFile "auth/login")
|
||||
authHttpManager = getHttpManager
|
||||
|
||||
-- | Access function to determine if a user is logged in.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue