diff --git a/app/Http/Controllers/Fo/Auth/VerificationController.php b/app/Http/Controllers/Fo/Auth/VerificationController.php index 809f6c9..1d7a7e1 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();