Add Login with Yahoo to your php website

Yahoo OpenId

In the previous article, we learned how to integrate google login using openid in php. Its good to know that Yahoo is also an openid provider and "Login with Yahoo" can be added to a website in a very similar manner. Yahoo's openid discovery url is http://me.yahoo.com/. The rest of the code is very simple.

The above page will present the user with a link for "Login with Yahoo". When the user clicks the link, he/she is taken to yahoo.com where they have to login(if they are not already), and then allow/deny Yahoo to provide information to the requesting website. If they allow, then their details are provided to the requesting website in GET parameters.

Register and Login

Once the details of the user are available, next thing is to register him on the system and log him in. If the email address is already registered, then just proceed with the login without any registration.

This site, binarytides.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.