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:
enableInsecureAuthand insecure fields (id,oauth_token_secret) are deprecated and may be removed in future versions. Use secure authentication withconsumerKeyandconsumerSecret. - Secure authentication exchanges the
oauth_tokenandoauth_verifierprovided by the client for an access token using Twitter's OAuth API.
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | The adapter configuration options. Properties
|
