parse-community / parse-community/parse-server-api-mail-adapter

Support users use their email as their username

Open
#55 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
27
Forks
21
Avg merge
56m
Merged PRs (30d)
1

Description

New Issue Checklist
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.

On the signing up section,

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:

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

#54

Environment
  • API Mail Adapter version: 2.10
  • Parse Server version: 4.10.4
Logs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the adapter's password-reset email handling and review the failing test case referenced as #54. Reproduce Parse.User.requestPasswordReset with a user whose email field is empty and whose username is an email address; done means the reset email is delivered using that username.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.