I suggest that the side without the doppelgangers consider investing on the creation of Lanterns of Aura in bulk (which cost 1,000 gp to create). These items are simple enough so most 3rd level casters can make them, and are even easier to use, not requiring any special knowledge unless you want to actually identify the magic auras.
Those could be stationed at guard gates or at the entrance of any important locations, and anyone who has a magic aura should be stopped for magical inspection, similarly to what we see at airports metal detectors (though those do not detect doppelgangers). If people are carrying magical equipment, they will have to remove everything magical before proceeding.
Another solution would be producing Rings of Arcane Signets (500 gp to create) for all officers. They produce an unique sign that will not change between people. Those are harder to create because they require the Forge Ring feat, but they are much safer as each person would have a specific image/symbol related to them, which could be identified by mundane characters.
Any other form of magical identification on items is prone to failure due to spells like Magic Aura, which can mask magic items as mundane or as a different type of magic item.
Lastly, the Arcane Mark could be used to identify all personel under your army, if you have enough people to either put their mark on other's skin or on identification badges. This mark is unique to each spellcaster (similar to the ring of arcane signets), can be made visible or invisible to mundane sight, and can't be easily duplicated by spells, even if spells are easily available to the doppelgangers.
If you combine both the lanterns and the arcane signets, officers would be easily identified as who they say they are and could skip the inspections on the Lantern Stations spread across the city. Doppelgangers would have to smuggle themselves into the city and between districts and avoid important buildings altogether. If they happen to steal an arcane signet, their sign would be different from the original person, so they would have to be inspected and identified as an enemy shapeshifter.
Another thing to keep in mind is that Doppelgangers are Monstrous Humanoids, and not Humanoids. So any spell and special abilities that work specifically against Humanoids, will not work on them. And those that work specifically against Monstrous Humanoids, will suddenly work on that obviously-not-a-shapeshifter-noble trying to get past the guards.
This, obviously, includes many spell effects that specifically target humanoids, like Enlarge Person or Charm Person. But also includes not so obvious spells, like Daze (effectivelly, Daze Humanoid). Daze obviously has a limit of 4HD, but this is a method that can be applied to most of a city's population, and if they resist even if being told not to (which the caster would immediatelly know), they certainly deserve an inspection. The spell can be made available to non-spellcasters through the Cloak of Hedge Wizard (1,125 gp to create)
Items like the Cap of Human Guise (400 gp to craft) would also instantly fail to work when used by a monstrous humanoid, as the item can only be used by small or medium humanoid creatures. The doppelgangers could adapt themselves to copy the illusory form, which would be immediately detected by spellcasters.
Feats like Shapeshifter Foil are very good at the hands of inquisitor-type characters, though they require at least a few levels of a spellcaster class. But a single point of damage should be enough to reveal a shapeshifter.
These options based on creature type will simply fail if the doppelgangers obtain the Human Guise feat though. But at least your are forcing them to be trained against (some of) your security measurements.