Last year was the first year I tried and I was surprised to have some success, most of the time I had the aperture on about f11, used a wide angle lens set to hyperfocal distance, stuck the camera on a tripod in bulb mode with the remote.
I took a couple of test shots at between 5 and 10 seconds when there were no fireworks to ensure that the background was near black (must be away from the bonfire or any streetlamps of course). Then I just waited until the fireworks started and held the shutter open for as many flashes as I felt like within the 5 - 10 second window.
I don't know if that's the right way to do it but I was quite happy with the results in terms of exposure. I'm looking forward to getting some better composition this year.
Cheers
Dan