
Hi List, I'm seeing a somewhat unexpected behaviour using Yesod.Auth.Email. What I'm doing is this: I enter a password into the form, but no email, and the login handler redirects me to /auth/page/email/login which seems to use the default layout (I specified a separate layout for auth) and does not render the login form. I can't see a method that lets me override where the user is sent on unsuccessful login, and judging from reading the sources I should be sent the LoginR way. Any idea what I could be doing wrong here? Thanks all, Karsten

digging deeper into the source, I found that its basically trying to
re-direct to the parent route, which, in this case is not obvious which
one that is? My guess is that its the PluginR Route, since it matches
the one I'm redirected to.
https://github.com/yesodweb/yesod/blob/master/yesod-auth/Yesod/Auth/Routes.h...
My question would be: is there a standard way of dealing with this kind
of failure that I'm overlooking? Shouldn't the default for unsuccessful
logins be /auth/login ?
Thanks for any pointers,
k
Karsten Gebbert
Hi List,
I'm seeing a somewhat unexpected behaviour using Yesod.Auth.Email. What I'm doing is this: I enter a password into the form, but no email, and the login handler redirects me to /auth/page/email/login which seems to use the default layout (I specified a separate layout for auth) and does not render the login form. I can't see a method that lets me override where the user is sent on unsuccessful login, and judging from reading the sources I should be sent the LoginR way. Any idea what I could be doing wrong here?
Thanks all,
Karsten _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

Hi Karsten,
I personally use the JSON API which gives me complete control over the flow.
First make sure you are using the latest version of yesod-auth.
If you are still having a problem with the layout that gets rendered then
that could be a bug.
With respect to where the login redirect that is probably also something
that should be changed.
So you should either
* open an issue on the github issues for yesodweb about the login redirect
* send this message to the yesodweb email list.
web-devel is supposed to be for things such as WAI that work across
frameworks.
Thanks,
Greg Weber
On Wed, Sep 17, 2014 at 8:25 AM, Karsten Gebbert
digging deeper into the source, I found that its basically trying to re-direct to the parent route, which, in this case is not obvious which one that is? My guess is that its the PluginR Route, since it matches the one I'm redirected to.
https://github.com/yesodweb/yesod/blob/master/yesod-auth/Yesod/Auth/Routes.h...
My question would be: is there a standard way of dealing with this kind of failure that I'm overlooking? Shouldn't the default for unsuccessful logins be /auth/login ?
Thanks for any pointers,
k
Karsten Gebbert
writes: Hi List,
I'm seeing a somewhat unexpected behaviour using Yesod.Auth.Email. What I'm doing is this: I enter a password into the form, but no email, and the login handler redirects me to /auth/page/email/login which seems to use the default layout (I specified a separate layout for auth) and does not render the login form. I can't see a method that lets me override where the user is sent on unsuccessful login, and judging from reading the sources I should be sent the LoginR way. Any idea what I could be doing wrong here?
Thanks all,
Karsten _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel
participants (2)
-
Greg Weber
-
Karsten Gebbert