Preheat your oven to 350°F. Spray a 9×13-inch baking pan with nonstick cooking spray.
In a large bowl, whisk together the 2 cups of all-purpose flour, ½ teaspoon of kosher salt, 1 heaping tablespoon of homemade apple pie spice, and 1 tablespoon plus 1 teaspoon of baking powder.
In a separate bowl, beat the 4 large eggs and 1 cup of granulated sugar along with ½ cup of lightly packed light brown sugar on high speed for about 5 minutes.
Reduce the mixer speed to low and add in ¾ cup of vegetable oil, ½ cup of full-fat sour cream, and 2 teaspoons of pure vanilla extract. Mix until well-combined.
Gradually add the flour mixture to the wet ingredients, mixing just until combined.
Fold in 2 pounds of Granny Smith apples and 1 cup of chopped walnuts or pecans (optional).
Spread the batter evenly into the prepared pan.
In a small bowl, combine ⅓ cup of coarse sugar and 1 teaspoon of ground cinnamon, then sprinkle it evenly across the top of the cake.
Bake the cake for 55 to 60 minutes, or until a toothpick inserted into the center comes out clean.
Let the cake cool, then serve warm or at room temperature.