Preheat your oven to 350°F (175°C) and grease a 9x9 inch baking pan.
In a large mixing bowl, combine the flour, brown sugar, granulated sugar, cocoa powder, baking soda, cinnamon, and salt. Whisk together until well mixed.
In a separate bowl, whisk together the vegetable oil, eggs, and vanilla extract until smooth.
Pour the wet ingredients into the dry ingredients and stir until just combined. Be careful not to overmix.
Gently fold in the diced apples, walnuts, and chocolate chips (if using) until evenly distributed in the batter.
Pour the batter into the prepared baking pan, spreading it out evenly.
Bake in the preheated oven for 25-30 minutes or until a toothpick inserted into the center comes out clean.
Once baked, remove from the oven and allow to cool in the pan for about 10 minutes. Then transfer to a wire rack to cool completely before cutting into squares.
Notes
Optional walnuts and chocolate chips can be added for extra flavor.