1. A handheld electronic device, comprising: a camera module, configured to take pictures; a flashlight module, configured to generate at least a first light having a first spectrum and a second light having a second spectrum; and a processor, configured to: randomly generate a flashlight indication signal having one or more pulse(s) distributed over time; direct the flashlight module to turn on the first light and the second light at different times based on the flashlight indication signal; direct the camera module to take pictures to obtain a stream of biological characteristic images comprising one or more first biological characteristic image(s) obtained when the first light is turned on and one or more second biological characteristic image(s) obtained when the second light is turned on; retrieve a first reference signature associated with the first light and pre-stored in the handheld electronic device, and a second reference signature associated with the second light and pre-stored in the handheld electronic device; generate a sequence of reference signatures by using the first reference signature and the second reference signature according to the randomly generated flashlight indication signal, wherein an order of the first reference signature and the second reference signature arranged in the sequence of reference signatures follows an order of turning on the first light and the second light at said different times; and compare the stream of biological characteristic images with the sequence of reference signatures to obtain an identity authentication result, wherein the first reference signature has a first texture pattern, the second reference signature has a second texture pattern, and the first texture pattern is different from the second texture pattern, and wherein the identity authentication result is a positive match when the first biological characteristic image(s) substantially match the first reference signature, the second biological characteristic image(s) substantially match the second reference signature and an order of the first biological characteristic image(s) and the second biological characteristic image(s) obtained in the stream of biological characteristic images matches the order of the first reference signature and the second reference signature arranged in the sequence of reference signatures.