Skip to content

GraphQL - signUp/createUser mutation throws error: This authentication method is unsupported #6306

@tran-huy-phuc

Description

@tran-huy-phuc

Issue Description

Using GraphQL playground to test signUp/createUser using Facebook. It throws error "This authentication method is unsupported"

The mutation:

mutation loginWithFacebook(
  $fbId: String
  $accessToken: String
  $expirationDate: String
) {
  createUser(
    fields: {
      authData: {
        facebook: {
          id: $fbId
          access_token: $accessToken
          expiration_date: $expirationDate
        }
      }
    }
  ) {
    username
    email
    id
  }
}

Environment Setup

  • Parse server config
{
 ...
  "auth": {
    "facebook" : {
      "appIds": ["my_fb_app_id"],
      "id": "user's Facebook id number as a string",
      "access_token": "an authorized Facebook access token for the user",
      "expiration_date": "token expiration date of the format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
    },
    "google": {
      "id": "user's Google id (string)",
      "id_token": "an authorized Google id_token for the user (use when not using access_token)",
      "access_token": "an authorized Google access_token for the user (use when not using id_token)"
    }
  },
...
  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.9.0
    • Operating System: Ubuntu
    • Hardware: AWS EC2
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): AWS
  • Database

    • MongoDB version: 3.6.3
    • Storage engine: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): same server with parse-server (Ubuntu on AWS EC2)

Logs/Trace

{
  "errors": [
    {
      "message": "This authentication method is unsupported.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "signUp"
      ],
      "extensions": {
        "code": 252,
        "exception": {
          "stacktrace": [
            "Error: This authentication method is unsupported.",
            "    at toGraphQLError (/usr/lib/node_modules/parse-server/lib/GraphQL/parseGraphQLUtils.js:33:10)",
            "    at ParseGraphQLSchema.handleError (/usr/lib/node_modules/parse-server/lib/GraphQL/ParseGraphQLSchema.js:237:49)",
            "    at resolve (/usr/lib/node_modules/parse-server/lib/GraphQL/loaders/usersMutations.js:55:28)",
            "    at processTicksAndRejections (internal/process/task_queues.js:93:5)"
          ]
        }
      }
    }
  ],
  "data": null
}

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