diff --git a/src/Guards/TokenGuard.php b/src/Guards/TokenGuard.php index c199582..c73e76a 100644 --- a/src/Guards/TokenGuard.php +++ b/src/Guards/TokenGuard.php @@ -93,7 +93,7 @@ public function user(): ?AuthenticatableInterface /** * Get the token for the current request. */ - public function getTokenForRequest(): string + public function getTokenForRequest(): string|null { $token = $this->request->query($this->inputKey); @@ -162,7 +162,7 @@ protected function getBearerToken(): ?string */ protected function getBasicAuthorization(): array { - $header = $this->request->header('Authorization'); + $header = $this->request->header('Authorization', ''); if (Str::startsWith($header, 'Basic ')) { try {