  Josephson weak links made of two-dimensional topological insulators (TIs)
exhibit magnetic oscillations of the supercurrent that are reminiscent of those
in superconducting quantum interference devices (SQUIDs). We propose a
microscopic theory of this effect that goes beyond the approaches based on the
standard SQUID theory. For long junctions we find a temperature-driven
crossover from Phi_0-periodic SQUID-like oscillations to a 2
Phi_0-quasiperiodic interference pattern with different peaks at even and odd
values of the magnetic flux quantum Phi_0=ch/2e. This behavior is absent in
short junctions where the main interference signal occurs at zero magnetic
field. Both types of interference patterns reveal gapless (protected) Andreev
bound states. We show, however, that the usual sawtooth current-flux
relationship is profoundly modified by a Doppler-like effect of the shielding
current which has been overlooked previously. Our findings may explain recently
observed even-odd interference patterns in InAs/GaSb-based TI Josephson
junctions and uncover unexplored operation regimes of nano-SQUIDs.
