Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Typing Issue with passwordPolicy validatorCallback

Open Beginner friendly
#10,471 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Domain
api, backend

Research direction

Start with types/Options/index.d.ts at the passwordPolicy validatorCallback declaration, then compare it with the usage in spec/PasswordPolicy.spec.js and the callback invocation in src/RestWrite.js. Update the typing so the documented callback usage produces no TypeScript error, and verify the relevant password-policy checks still pass.

Written by the indexing model from the issue text.

Description

type:bug
New Issue Checklist
Issue Description

Incorrect passwordPolicy Option validatorCallback typing.

The typing of the validatorCallback is () => void right now.

The spec uses this as () => bool
The rest prototype uses this as (password: string) => bool

Steps to reproduce

Add a passwordPolicy validatorCallback with correct typing:

const validatePassword = (password: string): boolean => {
  console.log('Validating password security');
  return password === 'badpw' ? false : true;
};
Actual Outcome
Type '(password: string) => boolean' is not assignable to type '() => void'.
  Target signature provides too few arguments. Expected 1 or more, but got 0.ts(2322)
index.d.ts(229, 5): The expected type comes from property 'validatorCallback' which is declared here on type 'PasswordPolicyOptions'
Expected Outcome

No typescript error.

Environment

I am using 9.9.0, but this is also on the alpha branch at time of writing.

Server

  • Parse Server version: 9.9.0
  • Operating system: N/A
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local

Database

  • System (MongoDB or Postgres): N/A
  • Database version: N/A
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): N/A

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): N/A
  • SDK version: N/A

Happy to fill those out more if you think it will be helpful!

Logs
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
1d 20h
Merged PRs (30d)
52

Getting set up

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.

More from parse-community/parse-server

All issues in parse-community/parse-server

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.