Wrapping the widget generated by the authEmail backend.

Hi guys, I'm trying to build a good looking login page, but I noticed the loginHandler that comes with yesod-auth just concatenates all the widgets from all the used auth backends. To make matters worse, the markup some of the backends generate is not even my preferred brand! :) So I try to at least wrap the authEmail widget inside my own html, with a login.hamlet file that looks a bit like this: .box %h1 Login .wrapper ^email^ I manage to get the widget out of the authEmail backend, but then I can't use it inside my hamlet file that I add using addHamlet b/c it doesn't typecheck. loginHandler = do let tm = liftHandler getRouteToMaster let email = tm >>= apLogin authEmail defaultLayout $ do setTitle $ string "Login" addHamlet $(Settings.hamletFile "login") Is there any way around this? Am I approaching this the wrong way? This could also be solved if instead of a widget I could get the url and fieldname information from the backend, so I can use those things inside my ad-hoc html. Moreso, as a way to customize the html I'm tempted to override or redefine apLogin inside my app's domain so I can customize the html it generates. But just to keep taking advantage of haskell's strenghts it would be nice to formalize this idea a bit more (and I don't know how to approach that). thanks in advance for your help cheers! ----nubis :)

Perhaps you already know that ("design by nubis"), but Haskellers login page [1] uses custom code [2,3] to deal with the login page. Although it's only OpenId, I guess the same idea works for e-mail. HTH! [1] http://www.haskellers.com/auth/login/ [2] https://github.com/snoyberg/haskellers/blob/master/Haskellers.hs#L478 [3] https://github.com/snoyberg/haskellers/blob/master/hamlet/login.hamlet -- Felipe.
participants (2)
-
Felipe Almeida Lessa
-
Nubis