<div dir="ltr">As far as I can tell, the module is actually incomplete. Try the following patch:<div><br></div><div><div>--- /Library/Perl/5.18/Dancer2/Plugin/Auth/Extensible/Provider/Database.pm<span style="white-space:pre"> </span>2016-11-04 20:50:52.000000000 +1100</div><div>+++ Database.pm<span style="white-space:pre"> </span>2017-11-23 22:37:21.000000000 +1100</div><div>@@ -375,7 +375,8 @@</div><div> unless defined $username;</div><div> </div><div> # Get our database handle and find out the table and column names:</div><div>- my $database = $self->database;</div><div>+ #my $database = $self->database;</div><div>+ my $database = $self->plugin_database($self->db_connection_name); # Per <a href="https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible-Provider-Database/issues/3">https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible-Provider-Database/issues/3</a></div><div> </div><div> # Look up the user, </div><div> my $user = $database->quick_select(</div><div>@@ -389,6 +390,28 @@</div><div> }</div><div> }</div><div> </div><div>+sub get_user_by_code {</div><div>+ my ($self, $code) = @_;</div><div>+ croak "code must be defined"</div><div>+ unless defined $code;</div><div>+</div><div>+ # Get our database handle and find out the table and column names:</div><div>+ #my $database = $self->database;</div><div>+ my $database = $self->plugin_database($self->db_connection_name); # Per <a href="https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible-Provider-Database/issues/3">https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible-Provider-Database/issues/3</a></div><div>+</div><div>+ # Get just the username of the user with the matching pw_reset_code</div><div>+ my $user = $database->quick_lookup(</div><div>+ $self->users_table, { 'pw_reset_code' => $code }, 'email'</div><div>+ );</div><div>+</div><div>+ if (!$user) {</div><div>+ $self->plugin->app->log("debug", "No such code $code");</div><div>+ return;</div><div>+ } else {</div><div>+ return $user;</div><div>+ }</div><div>+}</div><div>+</div><div> =head2 get_user_roles $username</div><div> </div><div> =cut</div><div>@@ -396,7 +419,8 @@</div><div> sub get_user_roles {</div><div> my ($self, $username) = @_;</div><div> </div><div>- my $database = $self->database;</div><div>+ #my $database = $self->database;</div><div>+ my $database = $self->plugin_database($self->db_connection_name); # Per <a href="https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible-Provider-Database/issues/3">https://github.com/PerlDancer/Dancer2-Plugin-Auth-Extensible-Provider-Database/issues/3</a></div><div> </div><div> # Get details of the user first; both to check they exist, and so we have</div><div> # their ID to use.</div><div><br></div><div>cheers,</div><div>Nathan</div><div class="gmail_extra"><br><div class="gmail_quote">On 23 November 2017 at 22:10, Andrew Beverley <span dir="ltr"><<a href="mailto:andy@andybev.com" target="_blank">andy@andybev.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Thu, 23 Nov 2017 10:28:31 +0000 Clive Eisen wrote:<br>
> However the login is failing and I am just returned to the login screen<br>
> with the banner set to LOGIN FAILED<br>
><br>
> There is no indication WHAT is failing - can anyone suggest either what<br>
> is wrong or where I can add debug - I have tried with and without roles.<br>
<br>
</span>I would start by hacking some debug statements directly into the<br>
authenticate_user() subroutine in Provider/Database.pm<br>
<br>
That function should be called by DPAE, so you can check firstly that<br>
it's actually being called, and secondly if/what/why it's returning a<br>
failure (assuming it is).<br>
<br>
Andy<br>
______________________________<wbr>_________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/<wbr>mailman/listinfo/dancer-users</a><br>
</blockquote></div><br></div></div></div>