From ae041049ea8b653c9c27ffe95eae7f712e6dae40 Mon Sep 17 00:00:00 2001 From: Tony Fox <111282924+tonyfox-disguise@users.noreply.github.com> Date: Wed, 14 Sep 2022 09:11:14 +0100 Subject: [PATCH 1/3] Added viaRemember function I've found some third-party apps like Filament use the Auth::viaRemember() when checking auth status --- src/Auth/Guard.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Auth/Guard.php b/src/Auth/Guard.php index fd34c05d..2833d3f4 100644 --- a/src/Auth/Guard.php +++ b/src/Auth/Guard.php @@ -127,6 +127,14 @@ public function hasScope( $state = $this->getState(); return in_array($scope, $state->getAccessTokenScope() ?? [], true); } + + /** + * Always returns false to keep third-party apps happy + */ + public function viaRemember() + { + return false; + } /** * Get the user context from a provided access token. @@ -272,4 +280,5 @@ private function getProvider(): \Illuminate\Contracts\Auth\UserProvider { return $this->provider; } + } From c6bc821101787a8cd7a3b9ad38830e147d05fa94 Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Wed, 14 Sep 2022 18:08:07 -0500 Subject: [PATCH 2/3] Update Guard.php --- src/Auth/Guard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth/Guard.php b/src/Auth/Guard.php index 2833d3f4..c879d9be 100644 --- a/src/Auth/Guard.php +++ b/src/Auth/Guard.php @@ -131,7 +131,7 @@ public function hasScope( /** * Always returns false to keep third-party apps happy */ - public function viaRemember() + public function viaRemember(): bool { return false; } From 7adcc5e1de8d2760a64263733f6fe2c1449d3292 Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Wed, 14 Sep 2022 18:21:39 -0500 Subject: [PATCH 3/3] Remove blank line breaking linter --- src/Auth/Guard.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Auth/Guard.php b/src/Auth/Guard.php index c879d9be..531c589e 100644 --- a/src/Auth/Guard.php +++ b/src/Auth/Guard.php @@ -280,5 +280,4 @@ private function getProvider(): \Illuminate\Contracts\Auth\UserProvider { return $this->provider; } - }