This repository contains the open source Google OAuth API that allows you to authenticate the Google Platform from your PHP app.
For access google OAuth api we need to login into google developers console.
- Create new project from Project Dropdown menu or select existing project
- From Dashboard click on “Enable Apis and services”. Search for Google+ Api and enable it for access.
- In the sidebar, select Credentials then select OAuth consent screen tab.
- Choose Email address which shown with developer info.
- Specify Product name
- Other fields like Homepage Url, Product logo url, Policy and Terms of service url is optional so you can iggnore it.
- At last click on save.
- Select Credentials tab, click the Create credentials drop-down list and select OAuth client ID.
- Choose Application type e.g Web, Mobile App e.t.c.
- Specify name you like to add.
- In the Authorized JavaScript origins field, enter your app origin URI.
- Set redirect url in Authorised redirect URIs field.
- Click on create button.
- OAuth client Dialogue box will prompt. There are client id and secret key available that need to be defined while calling Google Api.