diff --git a/app/Http/Middleware/AuthenticateJWT.php b/app/Http/Middleware/AuthenticateJWT.php index c701d9dd..82016196 100644 --- a/app/Http/Middleware/AuthenticateJWT.php +++ b/app/Http/Middleware/AuthenticateJWT.php @@ -32,6 +32,11 @@ class AuthenticateJWT } } + // If it's impersonating, skip the rest + if ($payload->get('impersonating')) { + return $next($request); + } + $error = null; if (! \Hash::check($request->ip(), $payload->get('ip'))) { $error = 'Origin IP is invalid';