Well of course the manufacturers of most electronic pet doors thought about that scenario and most of them use RFID ( radio frequency identification) to detect your pet and unlock the pet door. Some use a microchip embedded in the pet some use an RFID collar. Security wise the microchip is better because the collar can be easily removed from your pet (potentially).