SISTMR AUSTRALIA  |  AusJournal CCSP Labs  |  cyberpritam.com
ISSN: 2200-1875 (Print)  |  2200-1883 (Online)
AusJournal CCSP Series  •  Lab 5 of 6

Simplifying Moodle Registration
Using Google OAuth2

Eliminate registration friction with one-click Google Sign-In — from 5 painful steps to a single click
Author: Dr. Pritam Shah
SISTMR Australia
Intermediate Level
30 Minutes
March 2026

Lab Overview

In Labs 1–4, we set up the Moodle LMS, created courses, configured the AusJournal CCSP badge, and built the certification workflow. A major barrier for global learners, however, remains the registration process.

In this lab, we will eliminate that friction entirely by integrating Google OAuth2 into your Moodle site. Learners will be able to sign in with their existing Google account in a single click — no form, no email verification, no waiting.

Learning Objectives

  • Understand why registration friction causes learner drop-off
  • Configure Google Cloud Console to generate OAuth2 credentials
  • Connect Google OAuth2 to Moodle's authentication system
  • Test the Google Sign-In button on the Moodle login page
  • Integrate the login system with the AusJournal badge and LinkedIn workflow

The Problem

Without OAuth2, a new global learner must complete these steps before starting any course:

Step 1
Fill form
Step 2
Verify email
Step 3
Log in
Step 4
Find course
Step 5
Enrol & pay
#Action RequiredDrop-off Risk
1Fill in registration formHigh — many abandon here
2Check email for verification linkVery High — spam folders, delays
3Click verification link and log inMedium — extra step
4Search for and find the courseMedium — confusing for new users
5Click Enrol and payHigh — momentum is lost by now
Important

Research shows up to 70% of potential learners abandon registration before completing it. Every extra step costs enrolments and revenue.

The Solution

With Google OAuth2 enabled, the entire flow becomes:

Step 1
Click Google
Step 2
Select Gmail
Done
Inside Moodle
Cost

Google OAuth2 is completely free of charge. It does not use Google Cloud credits and requires no billing account for standard website usage.

01
Part One
Google Cloud Console Setup
1.1

Open Google Cloud Console

Open your browser and navigate to:

URLhttps://console.cloud.google.com

You will see the Google Cloud Console welcome screen with your project already created.

Google Cloud Console welcome screen
Google Cloud Console welcome screen with project orbital-gantry-479303-e5
Note

The $300 free credit banner is for Google Cloud services such as virtual machines and databases — NOT for OAuth2 login. You can safely dismiss it. Google Sign-In will never cost anything.

1.2

Navigate to APIs and Services

Use the hamburger menu (top-left three lines) and navigate to APIs and Services > Credentials.

Navigating to credentials
Navigating to APIs and Services > Credentials
Important

Do NOT enable the Identity Toolkit API if it appears — that is a Firebase enterprise service and is not needed for Moodle OAuth2 login.

1.3

The Credentials Page

You will land on the Credentials page showing API Keys and OAuth 2.0 Client IDs sections — both empty at this stage.

Empty credentials page
Empty Credentials page ready for configuration
1.4

Configure the OAuth Consent Screen

Click the yellow banner button Configure consent screen. Fill in:

FieldValue
User TypeExternal (allows any Google account)
App nameCyberPritam Learning
User support emailYour Gmail address
Developer contact emailYour Gmail address
All other fieldsLeave blank — click Save and Continue
OAuth configuration created
OAuth 2 configuration created confirmation
02
Part Two
Create OAuth2 Credentials
2.1

Create OAuth Client ID

Go back to Credentials and click + Create Credentials > OAuth client ID. Fill in exactly:

FieldValue
Application typeWeb application
NameMoodle Google Login
Authorised JavaScript originshttps://cyberpritam.com
Authorised redirect URIshttps://cyberpritam.com/admin/oauth2callback.php
Critical

The redirect URI must match exactly. Any typo will cause authentication to fail. Always use https:// — Google requires a secure connection.

2.2

Copy Your Credentials

After clicking Create, a popup displays your credentials. Copy both values immediately before clicking OK.

OAuth client credentials - redacted
OAuth client created popup — credentials redacted for security
🔒
Critical — Copy Now

The Client Secret is shown only ONCE. Copy and save BOTH the Client ID and Client Secret before clicking OK. Store them securely in a password manager.

If you lose the Client Secret, you must create a new OAuth client entirely.

CredentialFormat
Client IDxxxxxxxxxx.apps.googleusercontent.com
Client SecretGOCSPX-xxxxxxxxxxxxxxxxxxxxxxxx
03
Part Three
Configure Moodle OAuth2
3.1

Add Google as OAuth2 Service in Moodle

Navigate to your Moodle OAuth2 services page:

URLhttps://cyberpritam.com/admin/tool/oauth2/issuers.php

Click the Google button from the preset services, then paste your credentials:

FieldValue
Client IDPaste your Client ID from Google Console
Client SecretPaste your Client Secret from Google Console
Login pageTicked (Yes)
Service nameGoogle (leave as default)
Moodle OAuth2 services page
Moodle OAuth2 Services page showing Google successfully connected with Changes Saved confirmation
3.2

Enable OAuth2 Authentication

Navigate to the authentication management page:

URLhttps://cyberpritam.com/admin/settings.php?section=manageauths

Confirm OAuth 2 has the eye icon active (solid blue = enabled).

Authentication management
Authentication management page showing OAuth2 enabled alongside 3,310 existing users
Auth MethodUsersPurpose
Manual accounts3Admin accounts
Email-based self-registration3,310Existing learners — preserved
OAuth 2 (Google)New usersGlobal learners — one click
3.3

Enable Self-Registration for Google Users

Navigate to site policies and set self-registration to OAuth2:

URLhttps://cyberpritam.com/admin/settings.php?section=sitepolicies

Find the Self registration dropdown and set it to OAuth 2. This allows any Google user to auto-create a Moodle account on their first sign-in.

04
Part Four
Verify and Test
4.1

View the Updated Login Page

Open a new incognito window (Ctrl+Shift+N on Windows, Cmd+Shift+N on Mac) and navigate to:

URLhttps://cyberpritam.com/login/index.php

You should now see the Google Sign-In button alongside the existing login form and guest access option.

Live Moodle login page with Google button
Live Moodle login page at cyberpritam.com showing the Google Sign-In button
Success

Your login page now offers three access methods: Google one-click for new users, username/password for 3,310 existing users, and guest access to browse before purchasing.

4.2

Test Google Sign-In

Click the Google button and test with your personal Gmail account. Expected flow:

  1. Click Google button on cyberpritam.com/login
  2. Google opens a popup showing available Gmail accounts
  3. Select your Gmail account
  4. You are redirected back to cyberpritam.com and logged in automatically
  5. A new Moodle account is created for this Gmail address
  6. The learner can immediately browse and enrol in courses
4.3

Publish to Production

Important for Global Access

By default your OAuth app is in Testing mode which restricts it to specific test users. To allow ANY Google user to sign in globally, go to:

Google Console > Google Auth Platform > Audience > Publishing status > Production

05
Part Five
Integration with Badge and LinkedIn Workflow

The Google Sign-In integration works seamlessly with the AusJournal CCSP badge system. Here is the complete end-to-end learner journey:

#StageWhat Happens
1DiscoveryLearner finds cyberpritam.com via Google search or social media
2One-click loginClicks Google button — instant account creation, zero friction
3Course enrolmentPays via Stripe and enrols in CCSP course
4LearningCompletes theory modules and practice quizzes
5Final assessmentPasses final quiz with score ≥ 70%
6Badge issuedAusJournal CCSP badge auto-issued by Moodle
7Email notificationLearner receives badge email with LinkedIn Add button
8LinkedIn publishLearner adds CCSP certification to LinkedIn profile in one click
9VerificationEmployer clicks badge URL — sees AusJournal ISSN credentials
Lab Complete
Review and Summary

What You Accomplished

  • Created Google Cloud OAuth2 credentials at zero cost
  • Configured OAuth consent screen for CyberPritam Learning
  • Connected Google OAuth2 to Moodle authentication
  • Enabled one-click Google Sign-In on cyberpritam.com
  • Preserved all 3,310 existing user accounts without disruption
  • Integrated new login system with AusJournal badge workflow

Key URLs Reference

ResourceURL
Google Cloud Consolehttps://console.cloud.google.com
Moodle redirect URIhttps://cyberpritam.com/admin/oauth2callback.php
Moodle OAuth2 serviceshttps://cyberpritam.com/admin/tool/oauth2/issuers.php
Moodle auth management/admin/settings.php?section=manageauths
Site policies/admin/settings.php?section=sitepolicies
Live login pagehttps://cyberpritam.com/login/index.php

Troubleshooting

IssueFix
Google button not showingCheck OAuth2 is enabled in Manage Authentication
Redirect URI mismatch errorConfirm URI in Google Console matches exactly
Users cannot auto-registerSet Self registration to OAuth2 in Site policies
Lost Client SecretCreate a new OAuth client — the old one cannot be recovered
Access restricted to test usersChange Publishing status to Production in Google Console
📖
Lab 6 Preview — Splunk Micro-Course

In Lab 6 we will build the Splunk micro-skill course — theory content, search query practice, 20-question Aiken quiz, AusJournal Splunk Analyst badge, and global pricing setup.

Lab 5 Complete

Author: Dr. Pritam Shah  |  SISTMR Australia  |  AusJournal Editor-in-Chief

ISSN: 2200-1875 (Print)  |  2200-1883 (Online)  |  portal.issn.org