The recipe is unlocked after earning the Spice Examiner badge (awarded for sniffing, snorting, scrutinizing, studying, flattering, rubbing and loving every spice)
You have to romance a piggy. If you're decent in the haystack and 'give good bacon' then the piggy will direct you to a secret location where a shady individual will train you on the fine art of making onion sauce. But before he will train you, you are required to massage his feet with butterfly butter as payment.
16 spices plus allspice. Fill up your spice rack with every spice, then go along and use the verb action on each spice plus the allspce. There's no way you can miss it doing it that way.
Speaking of it, I got the Spice Examiner Badge, then tried to make the Face Smelter, and it still told me "you don't know how to make Onion sauce". Only when I went to the saucepan directly and checked the recipies did the Onion sauce recipie appear.
Don't know if this is a bug, but other people might have similar problems, so be aware of that.