parse-community / parse-community/parse-server
User is always being detected as new when logged in through Facebook, Twitter, or Google
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
-A user is being detected as new when he isn't.
-authData field being deleted for unknown reasons.
Steps to reproduce
Add the following code to the cloud code and try to login using Facebook, Twitter, or Google.
Parse.Cloud.afterSave(Parse.User, async (request) => {
if (!request.original) {
"need to perform some actions here when a user has just signed up"
}
});
Actual Outcome
This issue leads to performing unwanted actions over a non new user.
After a user performs a login/signup through Facebook, Twitter, or Google, the user is always being detected as a new user in afterSave.
When checking again in the database you can see that the same user has just logged in and it's not a new one,
Noticed also something with the authData field, when testing login with different methods the authData is being erased(doesn't happen all the time).
Expected Outcome
Not detect a user as a new one when he isn't.
Environment
Server
- Parse Server version:
parse-server@5.0.0-alpha.3 - Operating system:
Windows 10 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
FILL_THIS_OUT - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
Android - SDK version:
1.26.0
Logs
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 reproducing the Facebook, Twitter, and Google login flows described in the issue, focusing on Parse.Cloud.afterSave(Parse.User), request.original, and authData. Compare repeat logins with first-time signups and verify that existing users are not treated as new and that authData is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, node.js
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100