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/
From the projects list, select a project or Create Project
A pop-up window will ask for the Project name - enter something like:
yoursitehere.com - oauth login
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
On the left, click Credentials.
Click Create Credentials, then select OAuth client ID.
- Application Type
Select Web application
Enter a descriptive name - something like “glFusion CMS Google Authentication”
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
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.
Once you have created the Google Oauth keys and access tokens, you will need to enter these into the glFusion Configuration.
Navigate to Command & Control → Users & Submissions
Ensure User Login Method[oauth] is set to True
Set Enable Google OAuth Login Method to True
Enter the Client ID from Google in the Google OAuth Consumer Key field
Enter the Client Secret from Google in the Google OAuth Consumer Secret field
Select Save Changes
Now you have Google Authentication enabled for your site!
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.