Closed MarwaKhalid closed 2 years ago
Assigned to @tusharraval102 since he deals with credentials/authentication.
I looks like when we login, whatever we enter needs to match exactly (case sensitivity) whats stored in the DB for the email (since we use it as "key" for both the Admin and Client table):
I'd recommend setting the key/email to either all lowercase (like that for credentials) when we first create the key in the DB, then whenever we try to access it, we do the same for the requested key when we try to query for it (that way, both are in sync).
Note that when we do the fix, we'll also have to fix existing entries in the DB. Since we cant change keys in firebase, we'll probably have to delete those entries.
Example of a bad entry in the DB:
Emails are case sensitive, this means if we are trying to find the user's document based on their email, we MUST take into account the cases otherwise our application won't find the document in firebase.
auth.currentUser?.email; DOES NOT WORK! it stores the email as lowercase!