Skip to content

User is always being detected as new when logged in through Facebook, Twitter, or Google #7737

Open
@Meglali20

Description

@Meglali20

New Issue Checklist

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions