-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Book example of Yesod.Auth.Email needs updating / needs further instructions #241
Comments
I found someone else had a crack at this:
So I think that it's either that a) this guy's code didn't work either or b) the world has moved on and some import has been moved / renamed since the book was written. Can anyone tell me what I need to import to get this part of the book running? I will do a pull request to fix up the book once I get it working. |
I have found a number of other skeletons on this road, it seems that even if they got Yesod.Auth.Email working, getting custom registration/login forms working in Yesod is just too hard (that seems like a thing that anyone would want though?) They have often resorted to using AJAX (possibly from this example: https://github.com/yesodweb/yesod-cookbook/blob/master/cookbook/yesod-auth-json.md ) I just tried to compile this AJAX code as-is too, and I get the same error:
I think this Looking at the documentation for it: http://hackage.haskell.org/package/mime-mail-0.5.0/docs/Network-Mail-Mime.html It looks like it has been updated since the book was written, because there is no longer a record accessor (I think that terminology is possibly incorrect) called I can't find any examples of the new Mail.Network.Mime being used to learn from, so please chime in if this is obvious to you |
I got it working! ✅ I had to update the book's example code to match the updated diff of the Book's code against working code:
I will see if I can edit this into the book content somehow, but I'll leave this open, as I may fail to figure it out / not have permission etc. Now I just have to figure out how to get custom forms working! |
Hi all.
I'm trying to get basic registration/login working on my main Yesod project, so I am trying to get the Yesod.Auth.Email example running on my machine first
https://www.yesodweb.com/book/authentication-and-authorization#authentication-and-authorization_email
I copied the current code from the book as-is into a new file Email.hs and ran:
stack exec runghc Email.hs
And I got
Taking a first stab after googling, I ran
stack install mime-mail
which seemed to successfully install the library.Now I get:
Has anyone else gotten the tutorial running? Am I missing some setup?
The text was updated successfully, but these errors were encountered: