-
Notifications
You must be signed in to change notification settings - Fork 6
Case insensitive emails
Justin Tomich edited this page May 17, 2017
·
2 revisions
Authenticate uses :email
as the user's authentication key. Authenticate stores the user's email address in lower case.
Authenticate "normalizes" a user's email address when finding users by downcasing and removing spaces. Note that User.find_by_email(params[:email])
is case sensitive. If you need to find a user, use User.find_by_normalized_email(params[:email])
instead.
If you are adding Authenticate to an existing app with existing users, be sure to run a migration to downcase the value of the email column for all existing records in the users table.