How do to check to see if the user has a Google account.

Posted by skrat on Stack Overflow See other posts from Stack Overflow or by skrat
Published on 2010-05-31T09:48:47Z Indexed on 2010/05/31 9:52 UTC
Read the original article Hit count: 129

Filed under:
|
|
|

Is there any safe way to detect, on a web page, client side (JS), whether user has an Google/Yahoo/Live/? account?

I know about some suspicious ways to do this by styling visited links and then sneaking on computed style attribute, but it's more of a hack, Mozilla and maybe other are planning to crack down on this, as it might be abused.

But I need this to allow users more integration with their identity providers, like:

  • Have a Google account? ~> load contacts for sharing from Google Contacts API
  • Have an Yahoo account? ~> load contacts for sharing from Yahoo Contacts API
  • none of the above? show no link

I don't want to provide all these options to all visitors, would be nice if I can detect the account, and provide integration only in that case.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about api