I am using firebase auth for user login in my android app. My problem is sending a link for email verification and password reset.
The links in the mails sent to the government agency e-mail addresses used by some of my users are rendered unclickable by the firewall. Firestore rules are set to be accessible to logged in users. How can I run password reset method on user login page, I can't access firestore because user is not logged in.
By storing a randomly generated code under the user in Firestore, I also email it and prevent the user from seeing the data in the application when he logs in, without verifying the code.
My users java codes;
public class Persons implements Serializable {
private String person_name;
private String person_phone;
private String person_city;
private String person_district;
private boolean email_verification;
private int verification_code;
private Authorization person_authorization;
constructors...
getter and setter methods...
}
My firestore rules;
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}