Preheat the oven to 325F. Grease an 8x8” baking pan with butter, then line with parchment paper.
Trace a square outline of the pan on a separate piece of parchment paper; set aside.
In a large bowl, cream together the butter and sugars, until smooth and creamy. Add in the sourdough discard and egg, and mix to combine. Then, add in the powdered sugar, vanilla, and salt, and beat until just combined.
Gradually add in the flour, and mix until just incorporated.
Divide the dough in half. Take one half of the dough and press it firmly into the bottom of the prepared pan. Use the back of a spoon or a spatula to press and get it as even as possible.
With the other half of the dough, spread it onto the sheet of parchment paper with the square outline. Place into the fridge while you prepare the filling.
For the brown sugar filling, mix together the ingredients in a small bowl.
For the salted caramel, mix together the ingredients in a small bowl until combined and smooth.
Evenly spread the brown sugar cinnamon filling all over the dough in the pan. Then pour the salted caramel all over the top, and spread evenly.
Carefully place the reserved dough square that was in the fridge over the filling, pressing it down to gently secure.
Bake at 325F for 30-40 minutes, until the top is a light golden brown and the dough feels soft to the touch. Remove and let cool completely.
While cooling, make the glaze. Whisk together the ingredients until smooth.
Once the bars are cooled, lift them out of the pan. Drizzle the glaze all over the bars and spread evenly.
Divide into 9-16 squares.
Serve and enjoy!
