Skip to content

Twitter v2 OAuth 2.0: PKCE code_challenge parameter truncated #6327

Description

@UzairMashhadi

Title: Twitter v2 OAuth 2.0: PKCE code_challenge parameter truncated

Description:

When attempting to authenticate with Twitter v2 using Nango's OAuth integration, the authorization URL is malformed. The code_challenge parameter is being truncated.

Expected Behavior:
Authorization URL should include: code_challenge_method=S256&code_challenge=[base64url_encoded_sha256_hash]

Actual Behavior:
Authorization URL shows: _lenge_method=S256 (the code_cha prefix is missing)

This causes Twitter to reject the request with 400 errors:

Failed to load api.twitter.com/1.1/ing/referrer.json — 400
Failed to load api.twitter.com/2/oauth_... — 400
Environment:

Nango Integration: twitter-v2
Auth Method: OAuth 2
Client Type: Confidential (Web App, Automated App or Bot)
Scopes: tweet.read, tweet.write, users.read, offline.access
Steps to Reproduce:

Configure Nango twitter-v2 integration with valid X OAuth credentials
Attempt to authenticate a user via nango.auth('twitter-v2')
Observe truncated PKCE parameters in authorization URL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions