This is some info from Bruce N. Canfield's U. S. Combat Shotguns. There isn't a lot of info on WW1 Model 12's, other than there were some in the trenches and also at home, guarding military bases.
WW2 is a different story. Serial #'s are in the range from #939649 - 1035241. Receivers are marked with a large US and the flaming bomb on the right side of the receiver under the ejection port. Barrels have the flaming bomb on the top, just ahead of the receiver and length is approximately 20 3/4". It should have a barrel shroud with bayonett lug and sling attachment point. Many of the military shotguns are missing the original fore-end shroud. Another point is it may have been a police riot gun, in which case there might not be any US ordinance marks.
There may be exceptions to the above info as the records that remain may be incomplete.
I am not a military collector, just giving you some info from a book I have, to quickly identify if it is a US model. Perhaps one of the collectors among us will pipe up with more info.