TwitterAdapter

new TwitterAdapter(options)

Parse Server Configuration

To configure Parse Server for Twitter authentication, use the following structure:

Secure Configuration

{
  "auth": {
    "twitter": {
      "consumerKey": "your-consumer-key",
      "consumerSecret": "your-consumer-secret"
    }
  }
}

Insecure Configuration (Not Recommended)

{
  "auth": {
    "twitter": {
      "enableInsecureAuth": true
    }
  }
}

The adapter requires the following authData fields:

  • Secure Authentication: oauth_token, oauth_verifier.
  • Insecure Authentication (Not Recommended): id, oauth_token, oauth_token_secret.

Auth Payloads

Secure Authentication Payload

{
  "twitter": {
    "oauth_token": "1234567890-abc123def456",
    "oauth_verifier": "abc123def456"
  }
}

Insecure Authentication Payload (Not Recommended)

{
  "twitter": {
    "id": "1234567890",
    "oauth_token": "1234567890-abc123def456",
    "oauth_token_secret": "1234567890-abc123def456"
  }
}

Notes

  • Deprecation Notice: enableInsecureAuth and insecure fields (id, oauth_token_secret) are deprecated and may be removed in future versions. Use secure authentication with consumerKey and consumerSecret.
  • Secure authentication exchanges the oauth_token and oauth_verifier provided by the client for an access token using Twitter's OAuth API.
Parameters:
NameTypeDescription
optionsObject

The adapter configuration options.

Properties
NameTypeAttributesDefaultDescription
consumerKeystring

The Twitter App Consumer Key. Required for secure authentication.

consumerSecretstring

The Twitter App Consumer Secret. Required for secure authentication.

enableInsecureAuthboolean<optional>
false

[DEPRECATED] Enable insecure authentication (not recommended).