-
Notifications
You must be signed in to change notification settings - Fork 278
Description
Which middleware is the feature for?
[@hono/oauth-providers]
What is the feature you are proposing?
https://docs.x.com/x-api/users/get-my-user#parameter-user-fields
https://docs.x.com/fundamentals/authentication/oauth-2-0/authorization-code#scopes
Here’s a clean description you could use for this issue report:
The library’s type definitions for Twitter API scopes, user fields, and expansions are outdated compared to the current Twitter API specification.
- Scopes: The library does not include
users.emailandmedia.write, which are now officially supported. - User fields: Several fields such as
affiliation,confirmed_email,connection_status,is_identity_verified,parody,profile_banner_url,receives_your_dm,subscription,subscription_type, andverified_followers_countare missing. - Expansions: The
affiliation.user_idexpansion is not available in the library types.
Because of this mismatch, developers cannot request newer scopes/fields/expansions without workarounds, and in some cases, API calls (such as /2/users/me) may fail with 403 Forbidden if unsupported fields or scopes are requested.
Expected Behavior
The library should provide up-to-date type definitions that match the latest Twitter API documentation, ensuring that all available scopes, user fields, and expansions are supported.
Suggested Fix
- Add missing scopes (
users.email,media.write) - Add missing user fields (
affiliation,confirmed_email, etc.) - Add missing expansions (
affiliation.user_id)