Skip to main content

Connection Test

OneTap Login includes a built-in Connection Test tool that runs 5 diagnostic checks to verify your Google OAuth configuration is working correctly.

What It Tests

The Connection Test performs 5 checks:

#CheckWhat It Verifies
1Client ID FormatYour Client ID matches Google's format
2Client Secret FormatYour Client Secret is valid (optional)
3HTTPS EnabledYour site uses SSL
4REST APIWordPress REST API is accessible
5Google ConnectionServer can reach Google

Connection Test Success

Running the Test

Step 1: Access Settings

  1. Go to Settings > OneTap Login
  2. Look for the API Credentials section

Step 2: Click Test Connection

  1. Find the Test Connection button
  2. Click it
  3. Wait 2-5 seconds for results

Connection Test Button Click

Step 3: Review Results

A panel expands showing all 5 checks with status indicators:

IconStatusMeaning
✅ GreenPassedCheck successful
❌ RedFailedCheck failed, needs attention
⚠️ YellowWarningCheck passed with concerns
⏭️ GraySkippedNot applicable

Connection Test Results Panel

Check Details

Check 1: Client ID Format

What it verifies: The Client ID matches Google's expected format.

Expected format:

[numbers]-[alphanumeric].apps.googleusercontent.com

Example valid ID:

123456789012-abcdefghijklmnopqrstuvwxyz123456.apps.googleusercontent.com

Common failures:

IssueSolution
MissingEnter your Client ID
Extra spacesRemove leading/trailing spaces
IncompleteCopy the full ID
Wrong credentialUse Web application type

Check 2: Client Secret Format

What it verifies: The Client Secret matches Google's expected format.

Expected format:

GOCSPX-[alphanumeric]

Example valid secret:

GOCSPX-abcdefghijklmnopqrstuvwxyz12

Status possibilities:

StatusMeaning
✅ ValidSecret format correct
⏭️ SkippedField is empty (OK for basic usage)
❌ InvalidFormat doesn't match
Optional Check

The Client Secret is optional for basic One Tap functionality. This check shows "Skipped" if the field is empty, which is acceptable.

Check 3: HTTPS Enabled

What it verifies: Your site URL uses HTTPS.

How it checks:

$site_url = get_site_url();
$is_https = strpos($site_url, 'https://') === 0;

Common failures:

IssueSolution
HTTP siteInstall SSL certificate
Mixed contentFix HTTP resources on HTTPS pages
Wrong URL settingsUpdate WordPress URLs in Settings > General
Required

Google requires HTTPS for all OAuth implementations. There is no workaround.

Check 4: REST API Available

What it verifies: The WordPress REST API is accessible and working.

How it checks:

$response = wp_remote_get(rest_url('onetap/v1/status'));
$is_available = !is_wp_error($response) && $response['response']['code'] === 200;

Common failures:

IssueSolution
Security plugin blockingWhitelist /wp-json/onetap/
Permalinks issueRe-save permalinks
Server configurationCheck .htaccess rules
WAF blockingAdd exception for REST API

Check 5: Google Connection

What it verifies: Your server can reach Google's authentication servers.

How it checks:

$response = wp_remote_get('https://accounts.google.com');
$can_reach = !is_wp_error($response);

Common failures:

IssueSolution
Firewall blockingAllow outbound HTTPS (port 443)
DNS issueCheck server DNS settings
Proxy requiredConfigure wp_http_proxy
Hosting restrictionContact hosting provider

Interpreting Results

All Green ✅

All checks passed. Your configuration is correct.

Next steps:

  1. Test actual sign-in on your site
  2. Use incognito window
  3. Visit My Account page
  4. Try One Tap and button

Some Red ❌

One or more checks failed. See specific check details above.

Order to fix:

  1. Client ID (if failed) - Most critical
  2. HTTPS (if failed) - Required by Google
  3. REST API (if failed) - Required for callback
  4. Google Connection (if failed) - Required for validation

Yellow Warning ⚠️

Check passed but with concerns:

  • May indicate partial configuration
  • May indicate potential issues
  • Review the warning message

Gray Skipped ⏭️

Check was not run because:

  • Not applicable (Client Secret when empty)
  • Depends on failed check
  • Optional feature

Troubleshooting by Check

Client ID Invalid

Steps to fix:

  1. Go to Google Cloud Console
  2. Navigate to APIs & Services > Credentials
  3. Click on your OAuth 2.0 Client ID
  4. Copy the entire Client ID value
  5. Paste into OneTap Login settings
  6. Run test again

Client Secret Invalid

Steps to fix:

  1. Go to Google Cloud Console
  2. Navigate to your OAuth credentials
  3. Copy the Client Secret
  4. Paste into OneTap Login settings
  5. Or leave empty if not needed

HTTPS Not Enabled

Steps to fix:

  1. Install SSL certificate:
    • Use host's free SSL
    • Use Cloudflare free SSL
    • Use Let's Encrypt
  2. Update WordPress URLs:
    • Settings > General
    • Change both URLs to https://
  3. Run test again

REST API Unavailable

Steps to fix:

Check 1: Re-save permalinks

  1. Go to Settings > Permalinks
  2. Click Save Changes (no changes needed)
  3. Run test again

Check 2: Security plugin whitelist

Add to allowed endpoints:
/wp-json/onetap/v1/callback
/wp-json/onetap/v1/status

Check 3: Check .htaccess

# WordPress REST API
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-json/ - [L]
</IfModule>

Google Connection Failed

Steps to fix:

Check 1: Test server connectivity

# SSH into server
curl -I https://accounts.google.com

Check 2: Check firewall

  • Ensure outbound HTTPS (port 443) is allowed
  • Check for IP-based restrictions

Check 3: Contact hosting

  • Some hosts restrict external API calls
  • May need to whitelist Google domains

Running Tests Programmatically

For developers:

// Get test results
$results = OneTap_Connection_Test::run_all_tests();

// Check specific test
$https_passed = $results['https']['passed'];

// Get error message
$error_msg = $results['rest_api']['message'];

When to Run Tests

Run Connection Test when:

  • First setting up the plugin
  • After changing credentials
  • After changing server/hosting
  • After installing security plugins
  • When sign-in stops working
  • Before contacting support

Support Information

If tests fail and you can't resolve:

  1. Screenshot the test results
  2. Note any error messages
  3. Check server error logs
  4. Contact support with:
    • Test results screenshot
    • WordPress version
    • PHP version
    • Active plugins list
    • Hosting provider