Skip to content

bad or missing username when authenticating with Twitter #4291

@casajavi

Description

@casajavi

Issue Description

I am trying to use the Twitter authentication through the Rest API and I keep receiving this error:

bad or missing username

I have set up the parse server with the necessary data as follows:

auth: {
   twitter: {
     consumer_key: "redacted",
     consumer_secret: "redacted"
   }
}

and I am sending a POST to /users with the following payload:

"authData": {
          "twitter": {
            "id": "12345678",
            "screen_name": "ParseIt",
            "auth_token": "redacted",
            "auth_token_secret": "redacted"
          }
        } 

I could not find any documentation detailing on how to achieve this and most of what I have tried has been from following the conversation on the PR by @flovilmart that added this functionality.

Maybe I am doing something wrong, if anyone has any suggestions I would appreciate it.

Steps to reproduce

The following command:

curl -X POST 
-H "X-Parse-Application-Id: redacted" 
-H "X-Parse-REST-API-Key: redacted" 
-H "X-Parse-Revocable-Session: 1" 
-H "Content-Type: application/json" 
-d '{
"authData": {
          "twitter": {
            "id": "12345678",
            "screen_name": "ParseIt",
            "auth_token": "redacted",
            "auth_token_secret": "redacted"
          }
        } 
}' 
http://myserver.com/users

Expected Results

A new parse user should be created

Actual Outcome

The following error is thrown: bad or missing username

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.5.3
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Google App Engine
  • Database mLab, ObjectRocket, Digital Ocean, etc): mLab

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