Even photosensors have a tendency to produce more than one transition for each interruption. Unless designed not to, they can respond to the changing reflection from fingerprint skin variations as your finger is brought near the switching point. Similarly with a mechanical shutter, particularly if there are multiple ambient light sources and especially if they are ac-driven..
Such things are never quitre as easy as they first might appear..