glFusion Wiki

Site Tools


glfusion:remoteauth:google

Google Authentication

Google offers a large set of services beyond searching, including email, social pages, cloud storage and many other services. Google also offers OAuth2 authentication which allows glFusion to request Google to authenticate a user without exposing their Google password to glFusion.

Configuring Google Authentication

Google is constantly updating their API console which makes it very difficult to keep the documentation up-to-date. If you see deficiencies or errors, please let us know.

Navigate to the Google Cloud API Console - https://console.cloud.google.com/

  1. From the projects list, select a project or Create Project
  2. A pop-up window will ask for the Project name - enter something like:
    yoursitehere.com - oauth login
  3. Select Use Google APIs if available or If the API Manager page isn't already open, open the console menu Gallery Menu and select API Manager.
  4. On the left, click Credentials.
  5. Click Create Credentials, then select OAuth client ID.
Application Type
Select Web application
Name
Enter a descriptive name - something like “glFusion CMS Google Authentication”
Restrictions - Authorized JavaScript Origins
You should enter the full URL to your site here.
Authorized redirect URI's
You should enter the following: http://www.yoursitehere.com/users.php?oauth_login=google or http://yoursitehere.com/users.php?oauth_login=google

Be sure to change the www.yoursitehere.com to your domain information.

If this is your first time creating a client ID, you can also configure your consent screen by clicking Consent Screen. (The following procedure explains how to set up the Consent screen.) You won't be prompted to configure the consent screen after you do it the first time.

You can now select the Create Button. This will create your Google OAuth application and a pop-up window will be shown with your Client ID and Client Secret. Be sure to record these numbers as you will need to enter them into the glFusion configuration.

Finalizing Setup

Once you have created the Google Oauth keys and access tokens, you will need to enter these into the glFusion Configuration.

  1. Navigate to Command & ControlUsers & Submissions
  2. Ensure User Login Method[oauth] is set to True
  3. Set Enable Google OAuth Login Method to True
  4. Enter the Client ID from Google in the Google OAuth Consumer Key field
  5. Enter the Client Secret from Google in the Google OAuth Consumer Secret field
  6. Select Save Changes

Now you have Google Authentication enabled for your site!

User Experience

Once you have everything setup, when a user selects Login with Google they will be presented with a Google login screen that has your website name and logo (optional).

Once the user has logged into Google, they will be redirected back to your site and automatically be logged in.

glfusion/remoteauth/google.txt · Last modified: 2017/05/31 14:54 by iceman

Page Tools