From e7e7210be3fde32b88613d1faeb337e990b3689b Mon Sep 17 00:00:00 2001 From: Corentin Huet Date: Fri, 10 Apr 2026 10:27:56 +0200 Subject: [PATCH] fix: :bug: remove auth middleware from email verification --- app/Http/Controllers/Fo/Auth/VerificationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Fo/Auth/VerificationController.php b/app/Http/Controllers/Fo/Auth/VerificationController.php index b5e8e4b..f46fc6c 100644 --- a/app/Http/Controllers/Fo/Auth/VerificationController.php +++ b/app/Http/Controllers/Fo/Auth/VerificationController.php @@ -28,7 +28,7 @@ class VerificationController extends Controller */ public function __construct() { - $this->middleware('auth:frontend'); + $this->middleware('auth:frontend')->except('verify'); $this->middleware('signed')->only('verify'); $this->middleware('throttle:6,1')->only('verify', 'resend'); } @@ -58,7 +58,7 @@ class VerificationController extends Controller public function verify(Request $request): JsonResponse|RedirectResponse { /** @var \App\Models\Customer */ - $user = $request->user('frontend'); + $user = Customer::findOrFail($request->route('id')); if (!hash_equals((string)$request->route('id'), (string)$user->getKey())) { throw new AuthorizationException();