Abdulsattar Mohammed
Abdulsattar Mohammed

Reputation: 10742

How do you enable customers use their openid on your website, just like stackoverflow?

I want customers to use their openId on my site. I googled for this but didn't find any good tutorial. I use PHP and MySQL.

There is one at Plaxo. But it says we should download something from JanRain.com.

I saw the openId module of Drupal. It doesn't want anything to be downloaded.

Can anyone tell me what to do exactly?

Upvotes: 33

Views: 12458

Answers (9)

naXa stands with Ukraine
naXa stands with Ukraine

Reputation: 37974

HybridAuth is an open source social sign on php library.

The main goal of HybridAuth library is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter, LinkedIn, Google and Yahoo.

HybridAuth enable developers to easily build social applications to engage websites vistors and customers on a social level by implementing social signin, social sharing, users profiles, friends list, activities stream, status updates and more.

Hello world with HybridAuth:

<?php
 $config = dirname(__FILE__) . '/library/config.php';
 require_once( "library/Hybrid/Auth.php" );

 try{
     $hybridauth = new Hybrid_Auth( $config ); 
     $twitter = $hybridauth->authenticate( "Twitter" );
     $user_profile = $twitter->getUserProfile();
     echo "Hi there! " . $user_profile->displayName;
     $twitter->setUserStatus( "Hello world!" );
     $user_contacts = $twitter->getUserContacts();
 }
 catch( Exception $e ){
     echo "Ooophs, we got an error: " . $e->getMessage();
 }

Upvotes: 0

naXa stands with Ukraine
naXa stands with Ukraine

Reputation: 37974

The following libraries are available to assist with the implementation of an OpenID Identity Server and Consumer in PHP. The libraries in this section are intended to help with handling all of the details specific to OpenID and leaving you to provide the glue to integrate it into your site. (source)

Upvotes: 1

Bryan Legend
Bryan Legend

Reputation: 6896

Stack Overflow uses this library for the smoking hot javascript interface: http://code.google.com/p/openid-selector/

Upvotes: 24

Andrew Arnott
Andrew Arnott

Reputation: 81801

Many decent libraries are listed here: http://wiki.openid.net/Libraries

Upvotes: 12

ltd
ltd

Reputation: 194

You can also use rpx like uservoice does.

Upvotes: 4

Kenzal Hunter
Kenzal Hunter

Reputation: 836

Zend Framework has also developed an OpenID Component that can be used as a standalone (i.e. not dependent upon the rest of the framework), or, at the very least, requires minimal interaction (I believe it uses a responce object for redirection).

Either way, it's Yet Another Option, and especially usefull if building a ZF backed site.

Upvotes: 1

ceejayoz
ceejayoz

Reputation: 180105

Drupal's OpenID module started off using the JanRain library in 4.7.x, which is the most commonly used implementation of OpenID in PHP.

You don't have to download a library in Drupal because it's already built into Drupal core.

Upvotes: 4

Andy
Andy

Reputation: 30418

I only glanced at it, but does http://www.saeven.net/openid.htm do the trick for you?

Upvotes: 0

Ryan Ahearn
Ryan Ahearn

Reputation: 7934

If you are hosting your site on a linux machine, there should be a php-openid package you can install that will supply you with an open id client library you can use to enable open id logins. The package comes with good example code to get you started. If you aren't running linux or your distribution doesn't have php-openid, I'm 99% certain that php-openid is based on (or is directly) JanRain.com's php library, so downloading it directly should get you the same thing.

Upvotes: 3

Related Questions