How to determine if email is a Google Account?

Me and some guys here are working on a launch. We are currently using the Google OpenID API to manage registration and login to our application, but we want to move to an easier user registration model. And for this we need to know if there is a way to detect that email (and not gmail) is already a Google account. Is there a way to get this information from the Google Single Sign-On API?

Thanks for the help!:)

+3
source share
5 answers

You cannot do this. I do not think Google can tell you this without the consent of the user.

, Google Apps, URL URL- : https://www.google.com/accounts/o8/site-xrds?hd=mail.moztw.org

, OpenID . : http://www.slideshare.net/timdream/google-apps-account-as-openid

+3

, , - Google Apps, MX . , .

+4

Mac, "" $ host {example.com}, , Google.

:

$ host yelp.com
yelp.com has address 104.16.57.23
yelp.com has address 104.16.56.23
yelp.com mail is handled by 1 ASPMX.L.GOOGLE.com.
yelp.com mail is handled by 10 ASPMX2.GOOGLEMAIL.com.
yelp.com mail is handled by 10 ASPMX5.GOOGLEMAIL.com.
yelp.com mail is handled by 10 ASPMX3.GOOGLEMAIL.com.
yelp.com mail is handled by 5 ALT2.ASPMX.L.GOOGLE.com.
yelp.com mail is handled by 10 ASPMX4.GOOGLEMAIL.com.
yelp.com mail is handled by 5 ALT1.ASPMX.L.GOOGLE.com.
+4

, , addViewer. ... . , , " google". , , , google.

0

, . , () , , addViewer. , , , script .

function checkIfGoogleAccount(emailAddress) {
  try {
    SpreadsheetApp.getActiveSpreadsheet().addViewer(emailAddress) ;
    SpreadsheetApp.getActiveSpreadsheet().removeViewer(emailAddress) ;
    return true ;
  }
  catch(err) {
    return false ;
  }
}
0

Source: https://habr.com/ru/post/1776625/


All Articles