  The magnetic fields of the solar system planets provide valuable insights
into the planets' interiors and can have dramatic consequences for the
evolution of their atmospheres and interaction with the solar wind. However, we
have little direct knowledge of magnetic fields in exoplanets. Here we present
a method for detecting magnetic fields in the atmospheres of close-in
exoplanets based on spectropolarimetric transit observations at the wavelength
of the helium line at 1083 nm. This methodology has been successfully applied
before for exploring magnetic fields in solar coronal filaments. Strong
absorption signatures (transit depths on the order of a few percent) in the
1083 nm line have recently been observed for several close-in exoplanets. We
show that in the conditions in these escaping atmospheres, metastable helium
atoms should be optically pumped by the starlight and, for field strengths more
than a few $\times 10^{-4}$ G, should align with the magnetic field. This
results in linearly polarized absorption at 1083 nm that traces the field
direction (the Hanle effect), which we explore by both analytic computation and
with the Hazel numerical code. The linear polarization $\sqrt{Q^2+U^2}/I$
ranges from $\sim 10^{-3}$ in optimistic cases down to a few $\times 10^{-5}$
for particularly unfavorable cases, with very weak dependence on field
strength. The line-of-sight component of the field results in a slight circular
polarization (the Zeeman effect), also reaching $V/I\sim {\rm few}\times
10^{-5}(B_\parallel/10\,{\rm G})$. We discuss the detectability of these
signals with current (SPIRou) and future (extremely large telescope)
high-resolution infrared spectropolarimeters, and we briefly comment on
possible sources of astrophysical contamination.
