parse-community / parse-community/parse-server
Parse.Cloud.beforeLogin does not fire when a user is signed up and logged in for the first time
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
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 of Parse Server.
Issue Description
beforeLogin trigger does not fire on signup.
Steps to reproduce
Create a beforeLogin trigger, and inside of it, a console.log, then use Parse.User.signUp() to create a new user (thus automatically logging them in)
Actual Outcome
The trigger is not called; the log is never printed to the console.
Expected Outcome
The trigger is called, because signUp not only creates the user. It also creates a session and logs them in.
Environment
4.5.0
Server
- Parse Server version: 4.5.0
- Operating system: Unknown
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Back4app
- Database System (MongoDB or Postgres): MongoDB
- Database version: 3.6
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Back4app
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc): JavaScript
- SDK version: 3.4.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Parse.User.signUp flow and the beforeLogin trigger entry point to determine where the first-login path diverges. Reproduce the issue with a trigger that logs its invocation, then add coverage for signup-created sessions and verify that the trigger fires as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100