I have a Flutter mobile application which uses the Firebase email authentication. Users register themselves by entering username, password, current country and first and last name. When they register, I create a user document under the users collection which will have email as an id, first, last name, country, notification token. However once they verify their email address then only they can use all the features of the app.
My problem is, some users enters junk email address which does not exists. Due to this, I am ending up with having wrong email address in the Authentication as well as in my Firestore user collection too. Also as these are junk email addresses, they will never be able to verify and login.
Right now I have a Firebase scheduler function that deletes these unverified users (older than 30 days) from the Authentication as well as user collection.
I don't want to create any entry in the Firebase authentication as well as in the users collection until and unless the user verifies their email address. Or is there any other way to achieve this?
Thank you