From b09c99aa7696edc3d3e18029a954dea023c74e18 Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 26 Sep 2023 09:01:25 +0100 Subject: [PATCH 1/2] return 204 no content --- src/Http/Controllers/UserController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Http/Controllers/UserController.php b/src/Http/Controllers/UserController.php index 353ed0c00..2da2bfaf8 100644 --- a/src/Http/Controllers/UserController.php +++ b/src/Http/Controllers/UserController.php @@ -46,6 +46,8 @@ public function login($userId, $guard = null) : $provider->retrieveById($userId); Auth::guard($guard)->login($user); + + return response(status: 204); } /** @@ -61,6 +63,8 @@ public function logout($guard = null) Auth::guard($guard)->logout(); Session::forget('password_hash_'.$guard); + + return response(status: 204); } /** From 40efdc02d46a50baadf453fc22503acd44add5e9 Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 26 Sep 2023 09:31:05 +0100 Subject: [PATCH 2/2] docblocks --- src/Http/Controllers/UserController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Controllers/UserController.php b/src/Http/Controllers/UserController.php index 2da2bfaf8..d8b4b0952 100644 --- a/src/Http/Controllers/UserController.php +++ b/src/Http/Controllers/UserController.php @@ -33,7 +33,7 @@ public function user($guard = null) * * @param string $userId * @param string|null $guard - * @return void + * @return \Illuminate\Http\Response */ public function login($userId, $guard = null) { @@ -54,7 +54,7 @@ public function login($userId, $guard = null) * Log the user out of the application. * * @param string|null $guard - * @return void + * @return \Illuminate\Http\Response */ public function logout($guard = null) {