Skip to content

Facebook link and unlink overwrites username field #1532

Closed
@mnearents

Description

@mnearents

Running Parse-Server 2.2.7, Facebook SDK, 4.10.1. Environment: Heroku + MongoLab.

In my app, when a user signs up, I set their username equal to their email address.

My app doesn't have facebook login, so users use their email address to log in. But it does have a Connect to Facebook feature (available once logged in) where I call [PFFacebookUtils linkUserInBackground: user withReadPermissions: permissions]

When I do this, the user's username field is overwritten with a random string of characters. At first I thought this must be for Facebook authentication and I'll just have to create a workaround since my users always log in with an email and password (without the workaround, login then fails). So when I link a user with facebook, I call a cloud code function to set their username equal to their email address again.

However, when I unlink the user from facebook, the username field is again overwritten with a string of random characters. Now it doesn't make any sense. I could write another cloud code function to set the fields equal to each other, but I first wanted to ask if this is normal, or is it a bug?

The string of random characters is not the user's facebook id, nor is it their access token. I have no idea what it is. It's 32 characters long. The string when I link is not the same as when I unlink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions