parse-community / parse-community/parse-server

choose_password template shows "undefined" for username — username param missing from reset redirect URL

Open
#10,245 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
Issue Description

The choose_password password reset page displays "New Password for undefined" because the username query parameter is not included in the redirect URL generated by PublicAPIRouter.js, despite the template expecting it.

Steps to reproduce
  1. Call requestPasswordReset for any user
  2. Click the reset link sent via email
  3. Observe the label on the reset page reads "New Password for undefined"
Actual Outcome

The page renders: "New Password for undefined"

Expected Outcome

The page should render: "New Password for " (or the app name)

The comment at the top of the choose_password template explicitly states:

"The query params 'username' and 'app' hold the friendly names for your current user and your app."

However, requestResetPassword() in PublicAPIRouter.js only includes token, id, and app in the redirect username is absent:

const params = querystring.stringify({
token,
id: config.applicationId,
app: config.appName
// username is missing
});

While the template at line 184 reads:

document.getElementById('username_label').appendChild(document.createTextNode(urlParams['username']));

Contributor guide

Open the contributing guide

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 in PublicAPIRouter.js at requestResetPassword() and compare its redirect query parameters with the choose_password template around line 184. Verify how the reset URL is assembled and what value should supply username, then exercise requestPasswordReset and confirm the reset page displays the expected name instead of undefined.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
authentication, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.