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

Twitter auth, how to get email? #419

Closed
cutiko opened this Issue Nov 24, 2016 · 9 comments

Comments

Projects
None yet
5 participants
@cutiko

cutiko commented Nov 24, 2016

Greetings

It took me awhile but I can finally see what is in the new 1.0 release. So I handle to create the Twitter authentication and the user is correctly logged in. I was very surprised when in the firebase.google console the user have no email!

The first thing I did was to check it using:

String email = FirebaseAuth.getInstance().getCurrentUser().getEmail();
Toast.makeText(this, email, Toast.LENGTH_SHORT).show();

But there is no email. So I have being doing some search and found here some indications to get the email in web. However, in the Android documentation there is no email reference. What confuses me most is this StackOverflow question where is explained there is no way to get the email.

UPDATE: Another attempt to get more details was to send email verification, which didn't work with Twitter, cross check using email/password login.

Can we get the user email with Twitter login? Thanks in advanced.

@juanlet

This comment has been minimized.

Show comment
Hide comment
@juanlet

juanlet Nov 25, 2016

I just had the same problem. The email comes empty.....Maybe it's a privacy policy

juanlet commented Nov 25, 2016

I just had the same problem. The email comes empty.....Maybe it's a privacy policy

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Nov 25, 2016

Collaborator

I'm pretty sure this isn't related to Firebase-UI: https://apps.twitter.com lets you request the email permission in the permissions tab. I haven't tested it so I can't confirm that this works, sorry.

Collaborator

SUPERCILEX commented Nov 25, 2016

I'm pretty sure this isn't related to Firebase-UI: https://apps.twitter.com lets you request the email permission in the permissions tab. I haven't tested it so I can't confirm that this works, sorry.

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Dec 2, 2016

Collaborator

@cutiko @juanlet I finally got around to testing it today and I can confirm that the email is received if you request it in the Twitter dashboard:
image

Also, what do you think of this update to the README?

Collaborator

SUPERCILEX commented Dec 2, 2016

@cutiko @juanlet I finally got around to testing it today and I can confirm that the email is received if you request it in the Twitter dashboard:
image

Also, what do you think of this update to the README?

@samtstern samtstern closed this in 69f49eb Dec 2, 2016

samtstern added a commit that referenced this issue Dec 2, 2016

@SUPERCILEX

This comment has been minimized.

Show comment
Hide comment
@SUPERCILEX

SUPERCILEX Dec 2, 2016

Collaborator

@cutiko @juanlet Just FYI, to get the email you'll need to reset the permissions used by your app by going to https://twitter.com/settings/applications and revoking it.

Collaborator

SUPERCILEX commented Dec 2, 2016

@cutiko @juanlet Just FYI, to get the email you'll need to reset the permissions used by your app by going to https://twitter.com/settings/applications and revoking it.

@cutiko

This comment has been minimized.

Show comment
Hide comment
@cutiko

cutiko Dec 15, 2016

Just came to confirm this is working, thanks for the help

cutiko commented Dec 15, 2016

Just came to confirm this is working, thanks for the help

@Toofoo

This comment has been minimized.

Show comment
Hide comment
@Toofoo

Toofoo May 16, 2017

Hi, even when I chekc the "request email adress from user" box and reset the permisssion, I can't access the email from Twitter.
The FirebaseUI log display :
"com.firebase.uidemo E/TwitterProvider: Failure retrieving Twitter email. Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform."
Any idea ?

Toofoo commented May 16, 2017

Hi, even when I chekc the "request email adress from user" box and reset the permisssion, I can't access the email from Twitter.
The FirebaseUI log display :
"com.firebase.uidemo E/TwitterProvider: Failure retrieving Twitter email. Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform."
Any idea ?

@cutiko

This comment has been minimized.

Show comment
Hide comment
@cutiko

cutiko May 16, 2017

@Toofoo "or the user may not have an email address". In Twitter the user have the choice to make the email private. I have being wonderimg what would happen in this scenario. Can you confirm this is the case?

cutiko commented May 16, 2017

@Toofoo "or the user may not have an email address". In Twitter the user have the choice to make the email private. I have being wonderimg what would happen in this scenario. Can you confirm this is the case?

@Toofoo

This comment has been minimized.

Show comment
Hide comment
@Toofoo

Toofoo May 16, 2017

Actually in the the twitter account it written that the e-mail adresse will not be displayed to public; but I don't see any option to change this. ???
(I checked the box : allow anybody to find me by email address

Toofoo commented May 16, 2017

Actually in the the twitter account it written that the e-mail adresse will not be displayed to public; but I don't see any option to change this. ???
(I checked the box : allow anybody to find me by email address

@lborgman

This comment has been minimized.

Show comment
Hide comment
@lborgman

lborgman Nov 9, 2017

Just found that the email address is in result.user.providerData. (Or, was it exactly there?) Should not that be copied to result.user.email? (And in several other places too. o.O )

lborgman commented Nov 9, 2017

Just found that the email address is in result.user.providerData. (Or, was it exactly there?) Should not that be copied to result.user.email? (And in several other places too. o.O )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment