How do you validate the genuineness of personal fields in Firebase?

0

Hello everyone. In my project I have the following problem: I need to check if the CPF of a user that is registering already exists in firestore , but, for security reasons, I have defined that the user can only access the users collection (where defined the CPFs) if logged in. So I thought of some solutions:

  • Create a public collection in which the document key is uid (to make it easier to remove the data if the user deletes your account) and there are the CPFs.
  • Create a cloud function that checks the authenticity of a value, letting the user pass the collection and the field to search for ..
  • Which of the options seems to be the most ideal? I also accept new ideas.

        
    asked by anonymous 27.06.2018 / 14:52

    0 answers