28

I am new to OpenID, and want to implement Google OpenID authentication on my website. I could not found any examples.

Can anyone suggest me some good tutorials (step by step) or any working example with code to implement Google OpenID authentication using PHP.

Adrian Toman
  • 11,316
  • 5
  • 48
  • 62
Navin Kaushal
  • 281
  • 1
  • 3
  • 4

2 Answers2

30

I'd suggest using LightOpenID. It's small, easy to use, and has working examples. You probably won't need a tutorial to use it.

Another answer suggests using php-openid, but in my opinion, it's too complicated and has too many dependencies (it is, however, more powerful).

Mewp
  • 4,715
  • 1
  • 21
  • 24
4

use this library http://www.openidenabled.com/php-openid/
for the specs and architecture http://wiki.openid.net/
a simple tutorial will be http://remysharp.com/2007/12/21/how-to-integrate-openid-as-your-login-system/

zudokod
  • 4,074
  • 2
  • 21
  • 24
  • 1
    1) There are problems with the JanRain url (openidenabled) that have been used as a source for OpenID scripts. The folders no longer contain code, so I don't know if the project has become a pay-for commercial enterprise, but the downloadable packages at JanRain are no longer there. 2) That tutorial at remysharp does more damage than instruction, I feel. Go ahead and copy the code, and try it for yourself. I'm not allowed enough characters here to explain the places that tutorial will fail the reader. I would really like to find a good beginner tutorial to make OpenID work with PHP. – TARKUS May 21 '13 at 14:17