Green bean casserole, which turns 60 this year, doesn’t have to be made with canned soup or pre-made fried onions. This from-scratch version is also gluten- and dairy-free. Photo from LV Creative.

It doesn’t get any more Thanksgiving than green bean casserole. The quintessential casserole turns 60 this year, but the traditional version isn’t suited for gluten-free eaters.

This adaptation from Gluten Free Girl author Shauna James Ahern requires only a few more steps to make a side dish for Thanksgiving dinner that everyone might love. Warning, this makes a lot of crispy onions, which is rarely a bad thing.

Gluten-Free Green Bean Casserole

1 1/2 lbs. green beans, trimmed and snapped in half
For the crispy onions:
2/3 cups all-purpose gluten-free flour blend
Kosher salt and freshly ground black pepper
2 medium yellow onions, peeled and thinly sliced
Peanut oil or lard for frying
For the casserole:
1 1/2 cups chicken or vegetable stock (if you’re using boxed stock, make sure it’s gluten-free)
3 Tbsp. unsalted butter
2 cups sliced cremini or white mushrooms
Kosher salt
2 cloves garlic, peeled and minced
1/3 cup all-purpose gluten-free flour blend
1/2 cup coconut milk
Freshly ground black pepper

Heat the oven to 400 degrees. Set a large pot of salted water over high heat. Bring the water to a boil. Put a large bowl of ice water in the sink. Put the green beans in the boiling water and cook for 5 minutes. (If the beans are slender, cook for 3 minutes.) Plunge the hot green beans into the ice water. Let them sit for 1 minute, then immediately drain the water. Dry the beans with a towel and spread them out on a baking sheet to air-dry entirely.

Put the flour and salt and pepper for the onions into a wide bowl. Toss the onions in the flour to coat entirely. Put enough fat into a large cast-iron skillet to make a depth of 1 inch. Set the skillet over medium-high heat. When you can flick a tip-of-your-finger-full of water into the fat and it sizzles, you are ready to fry. Lower a light layer of the sliced onions into the fat and fry until they are lightly golden. Remove them with a slotted spoon and transfer to a plate lined with paper towels. Repeat until all the onions are fried. Set them aside for later.

Pour the stock into a large pot and bring to a boil over high heat. Turn the heat down to low and keep it at a simmer. Set a cast-iron skillet over medium-high heat. Put the butter in the skillet. When the butter has melted, add the mushrooms and season lightly with salt. Cook, stirring occasionally, until the mushrooms are hot and wilted, about 5 minutes.

Add the garlic and cook, stirring, for 2 more minutes. Toss the flour over the tops of the mushrooms and stir until the mushrooms are fully coated. Pour 1/4 cup of the hot stock into the skillet, stirring constantly. When the stock is incorporated into the mushrooms and bubbly hot, add another 1/4 cup. Continue this until all the stock is added and the sauce is thick. Add the coconut milk and keep stirring until the sauce is reduced and thickened, about 5 minutes.

Put the green beans into a large baking dish. Pour in the mushroom sauce. Toss until everything is coated. Sprinkle a bit of pepper on top. Top with the crisp onions. Bake until the sauce is bubbly around the edges of the onions, about 15 minutes. Serves 6.

— From “Gluten-Free Girl American Classics Reinvented” by Shauna James Ahern (Houghton Mifflin Harcourt, $29.99)