Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version.
Issue Description
Parse-server supports "users use their email as their username" :
On the resetting passwords section of parse-server JS SDK document,
This will attempt to match the given email with the user’s email or username field, and will send them a password reset email. By doing this, you can opt to have users use their email as their username, or you can collect it separately and store it in the email field.
You are free to use an email address as the username. Simply ask your users to enter their email, but fill it in the username property — Parse.User will work as normal. We’ll go over how this is handled in the reset password section.
Email adapter have to handle username as an email in this case.
When the adapter got there user
object as recipient and email
filed of user
is empty, use username
as an email.
Parse-server check below code of parse-server
:
- https://github.com/parse-community/parse-server/blob/260290409e747414c703ddec755d5cba73be5e83/src/Controllers/UserController.js#L205
- https://github.com/parse-community/parse-server/blob/260290409e747414c703ddec755d5cba73be5e83/src/Controllers/UserController.js#L308
- https://github.com/parse-community/parse-server/blob/260290409e747414c703ddec755d5cba73be5e83/src/Controllers/UserController.js#L226-L229
If you want check the early discussion of this issue, please check this
Steps to reproduce
- Setup
parse-server
with this email adapter. - Sing up : use their email as their username
- Request password reset
Parse.User.requestPasswordReset("email@example.com")
Actual Outcome
You can't not get any email.
Expected Outcome
You can get an "reset password email".
Failing Test Case / Pull Request
Environment
- API Mail Adapter version:
2.10
- Parse Server version:
4.10.4