In a medium bowl, sift the chickpea flour to remove any lumps. Gradually pour in the lukewarm water, whisking continuously to form a smooth, thin batter.
Whisk in the salt, 1 teaspoon (5 ml / 0.2 fl oz) of black pepper, and 2 tablespoons (30 ml / 1 fl oz) of the olive oil.
Cover the bowl with a towel and let the batter rest at room temperature for at least 30 minutes, or up to 12 hours for a deeper flavor.
When ready to bake, preheat your oven to 450°F / 230°C.
Pour 2 tablespoons (30 ml / 1 fl oz) of olive oil into a 12-inch cast-iron skillet or a nonstick pizza pan and place it in the preheating oven for 5-10 minutes until the oil is shimmering.
Carefully remove the hot pan from the oven. If using, stir the optional sliced onion and rosemary into the batter. Give the batter one final whisk and pour it into the hot, oiled pan.
Bake for 15-20 minutes, until the socca is firm and the edges are golden brown and pulling away from the sides of the pan.
For an extra crispy top, turn on the broiler.
Brush the top of the socca with the remaining 1 to 2 tablespoons (30 ml / 1 fl oz) of olive oil and place it under the broiler for 1-3 minutes. Watch it carefully to prevent burning—you're looking for a few browned spots.
Remove from the oven, sprinkle with extra black pepper, cut into wedges, and serve immediately while hot.
Turn it into Socca Pizza!
In the last 10 minutes of baking, add your favorite toppings like tomato sauce, vegan cheese, and olives. Skip the final broiling step.