Heat olive oil in a small skillet over medium heat. Add the onions and garlic then cook, stirring occasionally until the onions are soft, translucent, and smell sweet; about 5 minutes. Stir in the chili powder, cumin, smoked paprika, and coriander.
Step 3
Meanwhile, in a medium bowl, stir together the refried beans, salsa, diced chilies, cream cheese, and sour cream. When they are ready, stir in the cooked spiced onions and garlic.
Step 4
Taste the dip, and then adjust with salt and pepper as needed. For a spicy bean dip, add a pinch of cayenne pepper or a few dashes of hot sauce.
Step 5
Transfer about half of the dip to a small baking dish (see suggestions in the notes below). Scatter half of the shredded cheese over the dip then top with the remaining bean dip. Finish with the remaining shredded cheese.
Step 6
Bake the dip until hot throughout and the cheese melted, 20 to 25 minutes. Serve warm with a spritz of fresh lime juice on top.