How to create Google Application for Cakephp User Management Plugin

Cakephp 2.x and 3.x User Management Plugin provides you log in and registration with Gmail/Google+. For enable this feature you must create Google Application for API key, Client Id and Client Secret.

Lets see How to create your first Google Application.

In order to create a Facebook Application the basic requirements are:

  1. A Domain Name (for example ektanjali.com)
  2. A Gmail Account with Developer Console Enabled (mostly It comes with).

Things to do in your Google Account-

  1. Go to https://developers.google.com/console and sign in by an existing Google account’s username or password.
    When you logged in below screen will appear, for creating new project, click on Create Project button.
    create projectNow one popup window will appear, here enter details as per screen shot below and click on Create button.
    project details
  2. After clicking on Create button below screen will appear. Now go to APIs & auth link.API & Auth
  3. In this section click on APIs link and find Google+ API by default its off for using this API , make it on by clicking onto OFF button.Google+ api
  4. After Enabling Google+ API. You will see it under Enabled APIs list..enabled apis
  5. Now click on Credentials links, here two button will appear Create new Client ID and Create new Key. First click on Create new client ID.create client id
  6. After clicking on Create new app ID one popup window will appear. Here you can select your application type, select Web application and click on Configure consent screen.client id details
  7. Next in Consent screen you can write your product name, homepage URL and product logo which will appear when API access Google data. Then click on Save buttonproduct detailsproduct details
  8. In this window you can mention Authorized Javascript Origins and Redirect URIS.
    Redirect URIS used when Google authenticate the user and you want to redirect the user to url (url must followed by login/gmail). Now click on Create Client ID button.client id details
  9. After submitting this form, we can get the client Id, secret key and etc as below.for API key click on Create new key buttonapi access
  10. When you click on Create new key one popup window will appear, here you can generate API key for specific platform . We are using web application so click on Server key.api key details
  11. In this window just click on Create buttonserver key
  12. Now we finally got CLIENT ID, CLIENT SECRET and API KEY. You are all set.api details
  13. Now note down CLIENT ID, CLIENT SECRET and API KEY and login your site with Admin, go to All Settings, find Google Api Key, Google Client Id and Google Client Secret edit them enter your API KEY, CLIENT ID and CLIENT SECRET here and Save them.
  14. For enable, Log in with Google on your Site, edit setting Want to use Google Connect on your site? and check it save it.

Further If you have any questions please let me know on info@ektanjali.com.

Speak Your Mind