From e5380fcacf2d27862f70a855d3b18b526e5579c0 Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Thu, 1 Oct 2026 12:13:41 +0200 Subject: [PATCH] fix: :bug: disable password rehash for CRM customers --- app/Auth/CrmUserProvider.php | 19 +++++++++++++++++-- app/Models/Customer.php | 8 ++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/Auth/CrmUserProvider.php b/app/Auth/CrmUserProvider.php index 751ddb9..e6bc622 100644 --- a/app/Auth/CrmUserProvider.php +++ b/app/Auth/CrmUserProvider.php @@ -14,7 +14,6 @@ use Illuminate\Support\Str; use LDC\LDCCRM\Enums\ApiError; use LDC\LDCCRM\Exceptions\ApiErrorException; use LDC\LDCCRM\Exceptions\CrmException; -use LDC\LDCCRM\Models\Customer as CrmCustomer; /** * Crm user provider to integrate nicely with Laravel @@ -133,9 +132,25 @@ class CrmUserProvider extends EloquentUserProvider implements UserProviderContra Log::error(__CLASS__ . '::validateCredentials reached end of possibilities.'); return null; } + + /** + * CRM customer passwordless (Laravel 11 introduces password rehashing after login). + * + * @param \Illuminate\Contracts\Auth\Authenticatable $user + * @param array $credentials + * @param boolean $force + * @return void + */ + public function rehashPasswordIfRequired( + UserContract $user, + #[\SensitiveParameter] array $credentials, + bool $force = false + ): void { + // + } /** - * Create a local customer + * Create a local customer. * * @param \LDC\LDCCRM\Models\Customer $crmCustomer * @return \Illuminate\Database\Eloquent\Model diff --git a/app/Models/Customer.php b/app/Models/Customer.php index 40d3f8a..c11d656 100644 --- a/app/Models/Customer.php +++ b/app/Models/Customer.php @@ -286,6 +286,14 @@ class Customer extends Authenticatable implements MustVerifyEmail } } + /** + * Get the password for the user. + */ + public function getAuthPassword(): string + { + return ''; + } + // * --- END AUTH --- /**