-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to get user email. #97
Comments
same here |
I can confirm this issue. Any status on a fix? |
Twitter can return the email but if you don't explicitly ask for it it will not. By reading the source code of this Strategy, here is how you should ask for the email: TwitterStrategy({
consumerKey: configAuth.twitterAuth.consumerKey,
consumerSecret : configAuth.twitterAuth.consumerSecret,
callbackURL: configAuth.twitterAuth.callbackURL,
includeEmail: true, // <======= this
// also other options
},
// ...
) As written here https://github.com/jaredhanson/passport-twitter/blob/master/lib/strategy.js#L119 It will return the email of the user in his profile in the field |
Also try going to the developer console, the "Permissions" tab, click "Edit", check off "Request email address from users" under "Additional permissions" and click "Save". |
consumerKey: process.env.CONSUMER_KEY,
consumerSecret: process.env.CONSUMER_SECRET,
includeEmail: true,
callbackURL: '/dashboard/auth/callback',
proxy: true
This is my strategy, and here, 99% of the time I receive an email address, but not 1% of the time. How can I solve this? |
I tried both includeEmail and userProfileURL with include_email parameter set to true and they still don't work. includeEmail doesn't return profile.emails, and userProfileURL with a include_email query will throw 500 Internal Server Error Edit: I do have permission enabled on twitter API and regenerated the key and secret |
Hi we are running into this problem right now, and this solution |
I've requested permission from apps.twitter.com and the authentication process is working successfully but twitter is not returning the user's email. Please check my code if there is something wrong with what I'm doing. Thanks
The text was updated successfully, but these errors were encountered: