In a medium skillet, heat oil and sauté onion. Add the flour and mix well. Stir in the chiles, garlic, stock, and salt and simmer 20 minutes.
Purée in a blender. Use immediately over enchiladas or refrigerate or freeze for later use.