fix(auth): point auth provider to ApiClient and remove dead UserFactory (F-2026-0006)

This commit is contained in:
Jérémy Munsch 2026-08-26 10:04:36 +02:00
parent bc5303eb0a
commit 5ca882659d
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4
2 changed files with 2 additions and 48 deletions

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
use App\Models\User;
use Infra\Database\Models\ApiClient;
return [
@ -66,7 +66,7 @@ return [
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', User::class),
'model' => env('AUTH_MODEL', ApiClient::class),
],
// 'users' => [

View file

@ -1,46 +0,0 @@
<?php
declare(strict_types=1);
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends Factory<User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}