Configuring Google as an OAuth Provider in PHPKB

Estimated Reading Time: 2 Minutes

In this tutorial, you will learn how to configure Google as OAuth Provider with PHPKB OAuth plugin.

PHP Requirements:

  • PHP 7.0 or later
  • CURL extension
  • JSON extension
  • OpenSSL extension

Instructions – how to configure & use the plugin:

  1. Extract the package (that you received after purchasing this plugin) and copy all the files & folders and paste them at their respective locations under the installation directory (where you have installed PHPKB Software on your server). There is a new folder, called ‘add-ons’ (applicable to PHPKB v9.0), copy that and put it directly under the root folder (i.e. outside /admin/ folder) of the PHPKB package.
  2. Setup Google as an  OAuth Provider (as explained below):
    1. Go to https://console.developers.google.com/ and Login / Signup.
    2. Click on Select Project to create a new Google Apps Project, then click on NEW PROJECT.
    3. Enter your Project name under the Project Name field and click on Create .
    4. Now, click on Select a Project again and select the newly created Project by clicking on the project name that you entered in the previous step.
    5. Go to Navigation Menu > APIs > Services > Credentials .
    6. Click on Create Credentials button and then select OAuth Client ID from the options provided.
    7. In case you are facing some warning saying that in order to create an OAuth Client ID, you must set a product name on the consent screen. Click on the Configure consent screen button.
    8. Enter your product name under the Product Name Shown to Users field. Click on the SAVE button to save your settings.
    9. Select Web Application from the options below Application Type. Enter the name you want for your Client ID under the name field and enter the Redirect / Callback URI from PHPKB OAuth / OpenID-Connect plugin under the Redirect URL field.
    10. Click on the SAVE button to save your configurations. Now, you have successfully completed your Google App OAuth Server side configurations.
  3. Login to Administrator Control Panel as Superuser and go to Tools > OAuth / OpenID-Connect.
  4. Check & configure the settings accordingly. For easier configuration, some helpful notes are added under most of the fields/options.
  5. Test the configuration by going to the Login page (either in the Public area or Admin area).

  That’s all!

Interested to buy this plugin? Contact Us for Licensing & Pricing.