To prepare ribs: Place all of the ingredients except the ribs in a medium bowl and stir to combine; set aside. Cut 4 (24-by-12-inch) pieces of aluminum foil; set aside.
Pat the ribs dry with paper towels. Remove the thin membrane attached to the underside of the ribs: Flip the ribs over so they’re bone-side up. Starting at the end of 1 rack, slide the tip of a paring knife between the membrane and the bone, then lift and cut through the membrane. Grasping the membrane with a paper towel, pull it toward the other end of the rack and completely remove it. Repeat with the second rack.
Cut 1 rack in half crosswise and place the 2 pieces side by side on a sheet of foil. Repeat with the second rack and a second piece of foil. Evenly coat both sides of the ribs with the spice rub. Enclose each set of ribs in foil for 2 completely enclosed packets. Place the packets side by side on a rimmed baking sheet. Cover the baking sheet tightly with the remaining 2 pieces of foil.
You can roast the ribs immediately, but we recommend refrigerating them for at least a few hours (and up to 24 hours).
Heat the oven to 325 degrees Fahrenheit and arrange a rack in the middle. (If you rubbed the ribs in advance, remove them from the refrigerator and set aside at room temperature while the oven is heating, at least 20 minutes.) Place the ribs in the oven and roast until fork-tender, about 2 hours. Meanwhile, make the sauce.
To make barbecue sauce: Place all of the ingredients in a medium saucepan and bring to a simmer over medium heat, whisking occasionally. Reduce the heat to low and continue to simmer, whisking occasionally, until the flavors have melded and the sauce has reduced down, about 20-30 minutes. Remove from the heat and set aside until ready to grill. Sauce can be made in advance and refrigerated.
To grill the ribs: Heat grill to medium heat. Remove ribs from the foil, place them meaty-side up on the grill, and brush them with some of the sauce. Cover the grill and cook for 5 minutes. Flip and brush the ribs and cook another 5 minutes. Continue to cook, flipping and brushing every 5 minutes, until the sauce has thickened and the ribs are heated through and have grill marks, for a total grilling time of about 25 minutes.
Transfer the ribs to a cutting board and cut the racks between the bones. Transfer the remaining barbecue sauce to a serving bowl and serve with the ribs.