This tutorial helps and teaches you how to ease logins on your websites through the Gmail Accounts of your website users.
This is a complete PHP script that gives your users the ability to log into your websites using their Gmail Accounts.
To get started, please follow the steps given below to install the system.
Create your client ID and Secret OAuth Console HERE
You will be redirected to log into your Gmail Account as shown below:
After you have logged into your Gmail Account, You will see the below screen shot. Start using the Google APIs console: Click on CREATE PROJECT button
After clicked on CREATE PROJECT button, You will see the below screen shot.
Click on API Project dropDown box which is at the top left side of that page and Rename the Project to your Application name such as Vasplus Programming Blog
then click on save button
After you have renamed and saved your changes, You will see the below screen shot. From this screen shot, you will notice that the API Project name has changed to yours. Without delay, please click on the API Access link at the
top left side of the page to create your Client's ID and SECRET
Click on the Create an OAuth 2.0 Client ID button to proceed
After you have completed the steps above, Enter a Product Name and the URL to your website Logo then click on Update button to add your logo then click on Next button to proceed
On the next page, Select Web Application option then look down, you will see "Your site or hostname (more options)", click on the more option field to open the other options
Type in your Callback URL and your default Website URL as shown in the screen shot below then click on Create Client ID
Now you have your Client ID and and Client Secret. Copy these info and replace the once in the config.php
file and also replace application_name
with your website name and oauth2_redirect_uri
with the callback URL you provided during your application creation
Finally, open the file named config.php and fill in your database settings then save your changes and also open the file named users.sql, copy the table and run the query to create the required table for this tutorial and upload the gmail directory to your server. View the site for instance www.yoursite.com/gmail/index.php and you are done.