Re: [Firebase] Email case sensitivity for email/password simple log on

1,293 views
Skip to first unread message

Rob DiMarco

unread,
Feb 20, 2013, 1:08:09 PM2/20/13
to fireba...@googlegroups.com
Hi Paul -

Thanks for the email. In the past we have had a few inconsistencies around email case in the Simple Login system (for example, what the case of the email would be in the returned 'user' object, or in the 'auth' object used when writing your security rules).

At the current state, here's the current behavior:
  • When you create a user, the user's email is stored as lowercase.
  • When you log a user in, the returned 'user' object will always contain the user's email in lowercase.
  • When you access a user's email via the 'auth' variable in security rules, the user's email will be in lowercase.

If you have an instances where data is keyed by email address, I would recommend always using the lowercase version of that email address, and replacing the period with another character (i.e. a comma) since periods are not permitted in Firebase reference names. Also, I would recommend always using the lowercase email address when using the email as a key, which you can either do manually via user input or rely upon the all-lowercase one returned in the user object. Note that this guaranteed lowercase email in the returned object was only added recently, so that could be the source of the inconsistencies that you've seen.

I hope that helps - feel free to ping me directly if you run into any problems. Thanks!

Rob



On Tue, Feb 19, 2013 at 9:55 PM, Paul Guillod <pgui...@gmail.com> wrote:
Hi, sorry if this was posted elsewhere or already addressed, but I've noticed that when users sign in with the same e-mail address with different parts capitalized then either it is deemed an invalid username or (more oddly) it logs them on but then doesn't give access to the data. 

Obviously I could run emails through case transforms at each exchange, but I figured this is worth bringing up.

Alternatively, my security settings are incorrect.

Has anyone else had this issue or experiences it while trying to logon with the same email in a different case?

Appreciate the help!

Love me my Firebase!

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages