DPAE and reset passwords (Dancer2::Plugin::Auth::Extensible)
I'm trying to set up resetting passwords with DPAE (Dancer2::Plugin::Auth::Extensible). When I get a "please follow the link below" email, and click on the link, I'm directed to the standard login page, with "You need to log in to continue" (username/password or password reset). I would expect to be directed to a page asking me for the token, or asking me for a new password, or ...? thanks, Nathan PS: My config is below: Auth::Extensible: # After /logout: If no return_url is given: land here (no default) exit_page: '/' # Mailer options for reset password and welcome emails mailer: module: Mail::Message # Email module to use options: # Options for module via: sendmail # Options passed to $msg->send mail_from: 'example <me@example.com>' # From email address # Set to true to enable password reset code in the default handlers reset_password_handler: 1 #password_generator: eAlpaca::User::random_pw # Optional random password generator # Set to a true value to enable recording of successful last login times record_lastlogin: 1 realms: users: provider: 'Database' users_table: 'my_user_table' roles_table: 'user_roles' user_roles_table: 'my_user_roles_table' # roles_id_column: 'id' # roles_role_column: 'role' user_roles_user_id_column: 'my_id' # user_roles_role_id_column: 'roles_id'
On Mon, 3 Apr 2017 17:33:15 +1000 Nathan Bailey wrote:
I'm trying to set up resetting passwords with DPAE (Dancer2::Plugin::Auth::Extensible).
When I get a "please follow the link below" email, and click on the link, I'm directed to the standard login page, with "You need to log in to continue" (username/password or password reset).
Do you have user_as_object enabled with the DBIC provider? If so, you are experiencing this bug: https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible/pull/73
I would expect to be directed to a page asking me for the token, or asking me for a new password, or ...?
Yes, you should be directed to a page with a "click here to get your password" type button. Andy
On Mon, 3 Apr 2017 08:45:09 +0100 Andrew Beverley wrote:
Do you have user_as_object enabled with the DBIC provider? If so, you are experiencing this bug:
https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible/pull/73
Ah, no, that bug prevents the email being sent, and I've just seen your follow up issue on GH ;-)
On Mon, 3 Apr 2017 08:53:13 +0100 Andrew Beverley wrote:
I've just seen your follow up issue on GH ;-)
Or is that a different issue? The bottom line is that the "password retrieval" page will not be displayed if password_code_valid is not true when the login page template gets rendered, so that's where I'd start your debugging. Andy
Yes, forcing that value on in Extensible.pm makes the page appear, but then clicking the 'Reset password' button doesn't seem to do anything. The "$app->log(...)" statements don't seem to be appearing anywhere, is there a 'debug' mode I need to turn on or a config setting to direct the logging to a file/Log::Report? (that will make tracing through this a bit quicker!) cheers, Nathan On 3 April 2017 at 18:08, Andrew Beverley <andy@andybev.com> wrote:
On Mon, 3 Apr 2017 08:53:13 +0100 Andrew Beverley wrote:
I've just seen your follow up issue on GH ;-)
Or is that a different issue? The bottom line is that the "password retrieval" page will not be displayed if password_code_valid is not true when the login page template gets rendered, so that's where I'd start your debugging.
Andy
On Mon, 3 Apr 2017 19:15:31 +1000 Nathan Bailey wrote:
Yes, forcing that value on in Extensible.pm makes the page appear,
Okay, I would do some debugging around here to see if there is any attempt to set it: https://metacpan.org/source/HORNBURG/Dancer2-Plugin-Auth-Extensible-0.703/li...
but then clicking the 'Reset password' button doesn't seem to do anything.
As in does a POST request and forwards back to the same page, or nothing at all?
The "$app->log(...)" statements don't seem to be appearing anywhere, is there a 'debug' mode I need to turn on or a config setting to direct the logging to a file/Log::Report?
Yes, you can configure that per-dispatcher (with the mode changed to DEBUG) but probably easier just to do: use Dancer2::Plugin::LogReport mode => 'DEBUG'; Andy
participants (2)
-
Andrew Beverley -
Nathan Bailey