Google Apps Premier federated login with PHP

Google supports OpenID authentication or behaves as openid identity provider, using Google Apps accounts. Basically it means, user can use GA credentials to sign in into different services. This is especially useful for companies to unite other internal services with Google Apps single sign-in point. This is related to Standard edition as well.

I have got it working for PHP. Here is the story.

Having spent about 3 hours to get it work, I do not consider OpenID simple protocol that will conquer the Net soon. Why it shouldn’t be as simple as adding Paypal payment to a site ?

Nevertheless, I make working sample. I used php-openid-2.1.3.zip quite standard OpenId library and php-openid-apps-discover.tar.gz helper for Google Apps.

It does not need any installation, just make “tmp” directory writable. Do not test it using local apache, upload somewhere to the web.

Note: The Federated Login Service is disabled by default for Google Apps Premier and Education Editions. The domain admin can enable it from the Control Panel at http://www.google.com/a/cpanel/<your-domain>/SetupIdp.

Test here

Download library

9 Responses to “Google Apps Premier federated login with PHP”

  1. Marcus says:

    god bless you… thanks!

  2. Austin says:

    This is a great library!

  3. Austin says:

    I tried this and it used to work but now it doesn’t. No change on my end. Is there anything Google could have done to make this stop working?

  4. It seems there are some errors with includes. it includes wrong file. I rewrite it to include files in the current directory. Download updated archive.

    Also I installed test on my site:
    http://a32.me/other/openid-ga/

  5. Austin says:

    Still not working. Can you help me diagnose it? http://scottsdalebible.com/openid-ga/

  6. Your page says 404 not found. Does it work here http://a32.me/other/openid-ga/ on my site ?

  7. Austin says:

    Yes, it does work on your site. What file is not found though? All I did was put the openid-ga on my server. Do I need another file in the root? Email me at the address provided if you’d like.

  8. Austin says:

    Okay so I have to instances of this setup identically. One works, one doesn’t . Any thoughts?

    Here’s my dev site, which works: http://scottsdalebibledev.com/openid-ga/

    And my prod site that doesn’t: http://scottsdalebible.com/openid-ga/

  9. Austin says:

    Any ideas?

Leave a Reply

Spam protection by WP Captcha-Free