Skip to content

Commit

Permalink
Include the passport guard when throwing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
willrowe authored Oct 30, 2024
1 parent 6594120 commit e3419c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Exceptions/AuthenticationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@

class AuthenticationException extends Exception
{
public function __construct($message = 'Unauthenticated.', array $guards = null, $redirectTo = null)
{
if (is_null($guards)) {
$guards = [config('passport.guard')];
}

parent::__construct($message, $guards, $redirectTo);
}
}

0 comments on commit e3419c9

Please sign in to comment.