        } catch (JWTException $e) {
            return response()->json(
                ['error' => 'could_not_create_token'],
                Response::HTTP_UNAUTHORIZED
            );
        }

        $user = $auth->setToken($token)->authenticate();

        if ($user->isBanned()) {
            $auth->invalidate();
            return response()->json(
                ['error' => 'user_is_banned'],