Currently, cybersecurity has become one of the most important issues in the society, due to the growing technological evolution and use of digital platforms by organizations to connect with their users. A non-invasive biometric way of accessing an organizational platform is by verifying the presence of the user's face given by selfie photography in a database of authorized users. However, this procedure requires the prior construction of a database of authorized users, which prevents online verification of a person's identity. A feasible way to carry out an online verification is by comparing the photos of the identity document and the person's selfie. A system that allows this verification will improve the security of online use of a platform that prevents fraud and identity theft. In this work, we propose a deep neural network that allows verifying the identity of a person considering as inputs the photographs of an identity document and a selfie. This document presents experiments with various neural networks considering a public database of real camera photographs and identity documents. The results show that the use of a deep neural network with an ArcFace loss function configured with the database images of ID photos achieved a recognition rate of over 94%. Additionally, we test this procedure in a small validation sample of Chilean people obtaining similar rate. As future work, we propose the use of larger databases based on Chilean document data.