Heat oven to 350ºF (176ºC) with rack set in middle position.
Grease an 8×8-inch metal baking pan with nonstick spray; line pan with 1 piece of parchment paper to form a sling.
In a medium bowl, whisk together flour, oats, salt, baking powder and cinnamon.
Cut butter into tablespoons and add to a large bowl. Microwave butter in 30 second increments until melted.
Add coconut sugar, peanut butter and vanilla to warm melted butter and whisk until smooth; about 30 seconds.
Add egg yolks and whisk until a smooth caramel-like batter is formed (this part can be annoying—the mixture will clump into a big shiny ball—this is what you're going for). Scrape whisk clean.
Add flour mixture to peanut butter mixture and, using a stiff rubber spatula, mix until a dough comes together.
Roughly chop chocolate chips and chocolate candies; reserve 2 tablespoons for sprinkling over top.
Add remaining chocolate chips and chocolate candies to dough and mix to combine (you may need your hands for this bit since the dough is like a cookie batter).
Press dough into prepared pan in an even layer using hands.
Sprinkle reserved chocolate and candies over top and gently press into dough.
Bake cookie bar until edges are lightly browned and center is puffed but set, 17–20 minutes. (Don’t over-bake!)
Transfer pan to a wire rack and sprinkle bar with flaky sea salt, if using.
Let bar cool in pan 10 minutes. Lift bar out of pan using parchment overhang and transfer to wire rack to cool completely.
Using a large sharp knife, cut bar into 9 squares.