feat: add email support via confirmed_email field#10
Closed
rossshannon wants to merge 3 commits intounasuke:mainfrom
Closed
feat: add email support via confirmed_email field#10rossshannon wants to merge 3 commits intounasuke:mainfrom
rossshannon wants to merge 3 commits intounasuke:mainfrom
Conversation
Twitter/X added email support to OAuth 2.0 API v2 in April 2025 via the confirmed_email field. This commit: - Adds confirmed_email to user.fields in the /2/users/me API request - Uses confirmed_email in the info hash instead of hardcoding nil Requires users.email scope to be requested by the application. See: https://devcommunity.x.com/t/announcing-support-for-email-address-retrieval-with-oauth-2-0-in-the-x-api-v2/240555
8fff4aa to
d212d38
Compare
unasuke
requested changes
Dec 28, 2025
Owner
unasuke
left a comment
There was a problem hiding this comment.
Thankyou!! I didn't notice that announcement! 😍😍😍😍
- Add reference link to X Developer Community announcement - Revert bullet formatting to use asterisks (*) - Remove fork-specific installation instructions
unasuke
requested changes
Jan 6, 2026
Fix support for Rubies < 3.0 Co-authored-by: Yusuke Nakamura <unasuke@users.noreply.github.com>
Owner
|
@rossshannon Please rebase from the main branch to fix a failed test with the minitest-mock gem. Sorry. |
Owner
|
@rossshannon Merged your changes in #13 , thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for retrieving the user's email address from Twitter/X API v2.
As of April 2025, Twitter/X added the
confirmed_emailfield to their API v2 user endpoint. This PR:confirmed_emailto theuser.fieldsrequest parameterconfirmed_emailto the standardemailfield in the info hashChanges
lib/omniauth/strategies/twitter2.rbto request and mapconfirmed_emailusers.emailconfirmed_emailto the raw_info exampleUsage
Users need to:
users.emailin their OAuth scopenilif the user hasn't confirmed their emailTest plan