diff --git a/src/Exceptions/AuthenticationException.php b/src/Exceptions/AuthenticationException.php index 75ec03dbf..07940988e 100644 --- a/src/Exceptions/AuthenticationException.php +++ b/src/Exceptions/AuthenticationException.php @@ -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); + } }