Modern face recognition systems usually combine RGB, depth, and infrared cameras to do face antispoofing, but they are still not robust enough to unknown 3D high-quality mask attack. In our work, we developed a snapshot hyperspectral image sensor based on metasurface nanostructures to obtain the high-precision hyperspectral information of the detected face, and we built a practical antispoofing face recognition system using our new sensor. Experiments show that our sensor can reconstruct the reflectance spectrum of human skin, and this spectral information captured by our sensor can be quite effective and robust to identify spoof faces. We attack our system with several types of spoof faces, and our system reaches 97.98% accuracy in real-world testing scenes.