Skip to content

Adds ability to login with email when provided as username #4420

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

Merged
merged 1 commit into from
Dec 12, 2017

Conversation

flovilmart
Copy link
Contributor

@flovilmart flovilmart commented Dec 11, 2017

this should solve some issue with the clients trying to login with the email as the username.
Some additional checks could be made (like is the username 'email-like') but I'm not sure it would not cause more issues than right now.

For the sake of backwards compatibility, and to solve an unlikely edge case when User1 has email and User2 has the username == user1.email, the server will always prefer the user with the username matching (not the email). Perhaps that's not the right strategy. Let me know what you guys think.

@codecov
Copy link

codecov bot commented Dec 11, 2017

Codecov Report

Merging #4420 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4420      +/-   ##
==========================================
- Coverage    92.7%   92.66%   -0.05%     
==========================================
  Files         118      118              
  Lines        8346     8353       +7     
==========================================
+ Hits         7737     7740       +3     
- Misses        609      613       +4
Impacted Files Coverage Δ
src/Routers/UsersRouter.js 93.28% <100%> (+0.37%) ⬆️
src/RestWrite.js 93.28% <0%> (-0.55%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 96.83% <0%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8fd5f31...7f486e0. Read the comment docs.

Copy link
Contributor

@acinader acinader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reasonable approach.

@montymxb
Copy link
Contributor

montymxb commented Dec 12, 2017 via email

@flovilmart
Copy link
Contributor Author

Alright. As long as we’re onboard for the corner case, le’ts go with it!

@flovilmart flovilmart merged commit bad2179 into master Dec 12, 2017
@flovilmart flovilmart deleted the login-with-email branch May 1, 2018 17:37
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants