Will Face ID work in the dark?
Face ID works in the dark thanks to the flood illuminator. This means Face ID is not dependent on external light sources or purely the light emitted from the display.

Flood Illuminator
Invisible infrared light helps identify your face even when it’s dark.


https://www.apple.com/iphone-x/#face-id