banks/sprig-auth

Hashed password value is re-hashed upon login and

Closed this issue · 3 comments

It looks like password field is hashed again when model is filled with DB result.

Consider test case:

$auth = Auth::instance();
$user = Sprig::factory('user')->values(array(
    'username' => 'testuser',
    'password' => '12345',
    'password_confirm' => '12345',
    'email' => 'test@example.com',
    'logins' => 0,
))->create();
$auth->login('testuser', '12345'); // returns false

This is a known issue in Sprig itself. I'm waiting for an upstream fix before I close this but it is not code that belongs here.

The fix is a one liner and my recommendation is that until this is incorporated into Sprig, just put it in your own copy of sprig. Please feel free to add your voice to that issue to make sure it receives priority attention.

Thanks for the reply. This should be closed then, if it's problem with Sprig. Why don't you put the fix into your own Sprig fork meanwhile?

This should be closed then

I was going to leave it open to make it abundantly clear to all that the issue has not yet been resolved.

Why don't you put the fix into your own Sprig fork meanwhile?

Because several other people have already put this change into their forks. My hope is that this will be updated in the core really soon. If the problem lingers than I will pull the fix from someone else who has already made it.

My own fork is currently only there in the hope that some of my relationship changes will be pulled into Shadowhand's library. I don't actually use it day-to-day unless I have a specific need for additional relationship handling.