A Google account can have multiple email address associated with. e.g abc#yahoo.com can be an email address associated with a Google account, however if a user has Gmail setup, then the Gmail address becomes the primary email address associated with that account. So in the above case, the Google account in question will have abc#gmail.com as the primary email address; and abc#yahoo.com and abc#somenewcompany.com as secondary email addresses.
I wish to authenticate the user using abc#somenewcompany.com email address, but the token generated via Google OAuth and verified using the JSON object returned at https://www.googleapis.com/oauth2/v1/userinfo?access_token=generated-token only returns the primary email address.
Is there a way to identify this email address? somenewcompany.com is not a oauth provider.
Related
We're using our staff users on GSuite to authenticate with our management system which we are restricting to our hosted domain.
We'd like to be able to grab our staff's phone number from their company Google account so we don't have to build separate CRUD to allow us to manage their phone number.
Users are authenticated with the 'email' & 'profile' scopes.
Is it possible to retrieve the user's phone number in addition to their name, email, image?
See all the Google scopes.
There is a scope for Phone#
https://www.googleapis.com/auth/user.phonenumbers.read View your phone numbers
I am working on a requirement where I need to fetch user profile from various social media sites. For example, I can use the twitter's user search api to fetch user profile using the user name. But i have only email address and want to fetch user profile data from twitter using email address. I found out that twitter's api does not support user search based on email address. Similarly facebook API also does not support user profile search based on email ID. Is there any other way to fetch the user profile data from these websites using email Id's?
I have a whitelisted Twitter app that can request and receive email address of a twitter account when the owner of the account accepts and logs in through my app.
Now, I plan to connect it to my already available "Sign-up/Login by email" flow seamlessly.
The problem is, logged in Twitter user may not have verified their email account. In that case they can hijack a user on my system who signed-up with that email.
Therefore, I have to be sure that they have verified their email address. Otherwise I have to automatically send a confirmation link to the email address of the just-signed-in twitter user.
Is there any way to detect if the user confirmed their email address on Twitter? If not, what is the general solution to this problem? At least, how do you solve it for yourselves?
I found out that if the user does not verify their email address, Twitter will not return the email address even though it is there. So, if you receive an email address from Twitter, that should mean that the email address of the user is verified.
If anyone finds that this is not correct, please leave your comment or your findings.
Twitter returns a 0 length string in field email if user didn't verify his email.
...
translator_type: 'none',
email:''}
Currently we retrive user's profile by people.get API, and scopes are profile email https://www.googleapis.com/auth/plus.login.
But no matter user sets their home/work address as public, we still can't get address from reponse.
Did I use the wrong API or scopes?
As documented for scopes.
email gives access to "the user's Google account email address."
https://www.googleapis.com/auth/plus.profile.emails.read gives access to "the user's Google account email address, as well as any public, verified email addresses in the user's Google+ profile."
Is it possible to send an email to join the site as the currently logged in user on your site to his/her contacts?
You can do that now with the GMail API. You will need the user's consent of course, and will need the Contacts API to retrieve the user's contacts.