Closed ikusteu closed 10 months ago
My proposal for a plan involves making sure that emails are always normalized when stored: lowercased and stripped of any whitespace possibly present.
anExampleEmail@eXAMPLE.coM
into anexampleemail@example.com
.
There was a problem where a customer signed up with
CUSTOMER.NAME@gmail.com
, the auth entry has been created and customer self registered. Afterwards, at some point, the customer tried logging in withcustomer.name@gmail.com
. Since google auth is already case insensitive, the customer was able to authenticate, but sincefindCustomerByEmail
looks for an exact match, the differently cased email didn't match and the customer was prompted to self register (rather than being redirected to their/customer_area
page)Tasks
-note: it would probably be good to create a couple of string matching utils with different levels of strictness (in terms of whitespace, casing, etc...) and use those utils for string comparisons (in existing functionality and possible future one).