News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

InfoTuts.com:
Create Login With Google Plus in Your Website With PHP
April 15, 2014 @ 10:20:31

On the InfoTuts.com site they've posted a tutorial showing you how to make a "Log in with Google" button for your application and make it work with a little PHP magic on the backend.

So you want to allow users to login into your website using their gmail credentials? You have seen various websites that allow their users to login in their websites using gmail, facebook, linked in, Microsoft, git hub credentials. It's time to integrate it in your website. We will cover all the login system in our posts one by one and this one is dedicated to create Google Plus login for your website with PHP using OAuth2. Google offers many APIs like Google Maps, translate API, Analytics ApI etc. Today we will use its Google Plus API so lets proceed with our tutorial.

They break the process down into about five steps:

  • Login to Google API Console. Go to APIs and you will have to turn on Google Plus API.
  • Go to APIs and Auth and then under credentials tab. Click on create new client ID as shown below.
  • Now when you will have to enter your website path and the file path (redirect URI) to get your new client ID.
  • Now you have to set Consent screen.
  • In consent screen if you have entered Google Plus page path then you will have to approve connection.

The code for the actual connection is in the last step. It uses Google's PHP client libraries to configure and make the request, fetch the access token and grab the Google+ user's data.

0 comments voice your opinion now!
googleplus login oauth2 client library tutorial

Link: http://www.infotuts.com/login-with-google-plus-in-your-website-php

blog comments powered by Disqus

Similar Posts

DevShed: Working with MySQL Result Sets and the Decorator Pattern in PHP

PHPMaster.com: Continuous Integration (with Jenkins), Part 2

Juozas Kaziukenas' Blog: SQL Native Client as MSSQL driver for Zend Framework

AnyExample.com: PHP password generation

PHP Addiction Blog: PHP - No Container libraries?


Community Events





Don't see your event here?
Let us know!


language code list configure community application library developer bugfix threedevsandamaybe install interview release laravel podcast framework series wordpress api introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework