-
Notifications
You must be signed in to change notification settings - Fork 110
Allow login and registration with capitalized emails #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
||
// Here we will attempt to reset the user's password. If it is successful we | ||
// will update the password on an actual user model and persist it to the | ||
// database. Otherwise we will parse the error and return the response. | ||
$status = Password::reset( | ||
$this->only('email', 'password', 'password_confirmation', 'token'), | ||
$this->only($validated['email'], 'password', 'password_confirmation', 'token'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only() method accept input names not values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Rattone, yes, @cspohn-ltb, can you make this update.
@cspohn-ltb, if you make that update in the
This is more of the 'Laravel' way 😉 Thanks, after you make those updates I can get this approved and we can work on merging it in. |
@tnylea I've adjusted the changes as requested and included some additional unit tests 😉 |
This PR adds support for users to register and log in using email addresses with capital letters (e.g. [email protected]). Internally, all email addresses are automatically converted to lowercase to ensure consistent handling and avoid duplicate accounts due to case differences.
What’s changed:
During registration, the provided email is converted to lowercase before being saved.
During login, the input email is also lowercased before attempting authentication.
Improves user experience and reduces confusion related to email case sensitivity.
This update is fully backward-compatible and does not affect existing accounts.