diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 662bd14943d..d806f300c25 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -47,6 +47,9 @@ public function boot() '--force' => true, ]); $user = User::first(); + $user->wasRecentlyCreated = false; + $newToken = $user->createToken('test'); + $user->withAccessToken($newToken->accessToken); app('auth')->guard('sanctum')->setUser($user); app('auth')->shouldUse('sanctum'); // @codeCoverageIgnoreEnd