Error Codes Reference
This guide provides a complete reference of all error codes and messages you may encounter with OneTap Login, along with their causes and solutions.
User-Facing Errors
These errors are shown to users in the frontend.
access_denied
Message: "Access was denied. Please try again or use another sign-in method."
Cause: User clicked "Cancel" or denied permission in Google's consent screen.
Solution:
- User must click "Allow" to proceed
- If persistent, check OAuth consent screen settings
- Verify required scopes are minimal
popup_closed
Message: "The sign-in popup was closed. Please try again."
Cause: User closed the Google popup before completing sign-in.
Solution:
- User needs to complete the sign-in flow
- Check if popup blocker is interfering
- Ensure popup opens in correct position
network_error
Message: "A network error occurred. Please check your connection and try again."
Cause: Network request failed during authentication.
Solution:
- Check internet connection
- Verify site is accessible
- Check if Google services are reachable
- Review firewall/security settings
email_exists
Message: "An account with this email already exists. Please log in with your password."
Cause: Google email matches existing WordPress user, but account linking is disabled.
Solution:
- Enable account linking in settings
- Or user logs in with password first
- Use Account Merge (PRO) for secure linking
generic_error
Message: "An error occurred. Please try again."
Cause: Unexpected error during authentication.
Solution:
- Check debug log for details
- Review server error logs
- Contact support if persistent
rate_limited
Message: "Too many login attempts. Please try again in a few minutes."
Cause: IP exceeded rate limit (10 requests / 5 minutes).
Solution:
- Wait 5 minutes
- Check for automated requests
- If legitimate traffic, consider whitelist
invalid_token
Message: "Authentication failed. Please try again."
Cause: JWT token validation failed.
Solution:
- Token may be expired - try again
- Check server time is correct
- Verify Client ID matches
forbidden_role
Message: "Account registration is not available for your account type."
Cause: Attempted to assign forbidden role (admin, editor, shop_manager).
Solution:
- Configure safe default role
- This is a security feature - cannot bypass
Google API Errors
Errors returned by Google's authentication services.
invalid_client
Google Message: "Error 401: invalid_client"
Cause: Client ID or Secret is incorrect.
Solution:
- Re-copy Client ID from Google Cloud Console
- Re-copy or regenerate Client Secret
- Verify correct project selected
invalid_request
Google Message: "Error 400: invalid_request"
Cause: Malformed authentication request.
Solution:
- Clear browser cache
- Check for plugin conflicts
- Verify JavaScript not modified
invalid_grant
Google Message: "Error 400: invalid_grant"
Cause: Authorization code expired or already used.
Solution:
- Try signing in again
- Check server time synchronization
- Don't refresh during OAuth flow
redirect_uri_mismatch
Google Message: "Error 400: redirect_uri_mismatch"
Cause: Callback URL not in authorized list.
Solution:
- Add to Google Cloud Console:
https://yourdomain.com/wp-json/onetap/v1/callback - Include www variant if applicable
unauthorized_client
Google Message: "Error 401: unauthorized_client"
Cause: Client not authorized for this request type.
Solution:
- Verify OAuth client type is "Web application"
- Check OAuth consent screen is configured
- Ensure correct scopes enabled
access_denied (Google)
Google Message: "Error 403: access_denied"
Cause: User denied permission or app restricted.
Solution:
- User must approve the permissions
- Check app is not restricted in Google Cloud
- Verify OAuth consent screen is approved
temporarily_unavailable
Google Message: "Error 503: temporarily_unavailable"
Cause: Google services temporarily unavailable.
Solution:
- Wait and try again
- Check Google Status Dashboard
- This is rare and usually brief
JavaScript Errors
Errors in browser console.
GSI_LOGGER - Invalid origin
Console Message: [GSI_LOGGER]: Invalid origin for client
Cause: Current domain not in Authorized JavaScript Origins.
Solution:
- Add domain to Google Cloud Console
- Include both www and non-www
- Use HTTPS
GSI_LOGGER - Missing required parameter
Console Message: [GSI_LOGGER]: Missing required parameter: client_id
Cause: Client ID not configured or not passed to script.
Solution:
- Set Client ID in plugin settings
- Clear cache after saving
- Check if settings saved correctly
Failed to load resource: gsi/client
Console Message: Failed to load resource: the server responded with a status of 403
Cause: Google Identity Services script blocked.
Solution:
- Check if security plugin blocking
- Verify no CSP (Content Security Policy) issues
- Allow scripts from accounts.google.com
TypeError: Cannot read properties of undefined
Console Message: TypeError: Cannot read properties of undefined (reading 'accounts')
Cause: Google script not loaded before use.
Solution:
- Check script loading order
- Ensure no JavaScript errors before GSI
- Clear cache and retry
REST API Errors
Errors from WordPress REST API endpoints.
rest_forbidden
Response: {"code":"rest_forbidden","message":"Sorry, you are not allowed to do that."}
Cause: REST API access blocked.
Solution:
- Check security plugin settings
- Verify REST API not disabled
- Check user capabilities
rest_no_route
Response: {"code":"rest_no_route","message":"No route was found matching the URL and request method."}
Cause: OneTap endpoint not registered.
Solution:
- Flush permalinks (Settings > Permalinks > Save)
- Deactivate/reactivate plugin
- Check for fatal PHP errors
invalid_nonce
Response: {"code":"invalid_nonce","message":"Invalid security token."}
Cause: CSRF token validation failed.
Solution:
- Clear browser cache
- Check for caching plugin issues
- Verify nonce not cached
Server-Side Errors
Errors logged in debug.log.
ONETAP_ERROR: Token validation failed
Log: [ONETAP] Token validation failed: Invalid audience
Cause: Token's audience doesn't match Client ID.
Solution:
- Verify Client ID matches between settings and Google Cloud
- Check for copy/paste errors
ONETAP_ERROR: User creation failed
Log: [ONETAP] User creation failed: [error details]
Cause: WordPress couldn't create user.
Solution:
- Check for username conflicts
- Verify database connectivity
- Check user table constraints
ONETAP_ERROR: Rate limit exceeded
Log: [ONETAP] Rate limit exceeded for IP: x.x.x.x
Cause: Too many requests from IP.
Solution:
- Normal security behavior
- Whitelist IP if legitimate
- Check for bot traffic
ONETAP_ERROR: Webhook delivery failed
Log: [ONETAP] Webhook delivery failed: HTTP 500
Cause: Webhook endpoint returned error.
Solution:
- Check webhook URL is correct
- Verify endpoint is working
- Check endpoint logs
HTTP Status Codes
400 Bad Request
Something wrong with the request.
Common causes:
- Invalid parameters
- Malformed JSON
- Missing required fields
401 Unauthorized
Authentication failed.
Common causes:
- Invalid token
- Expired credentials
- Wrong Client Secret
403 Forbidden
Access denied.
Common causes:
- IP blocked
- Security plugin blocking
- Insufficient permissions
429 Too Many Requests
Rate limited.
Common causes:
- Exceeded 10 requests/5 minutes
- Automated requests
- Shared IP with high traffic
500 Internal Server Error
Server-side error.
Common causes:
- PHP fatal error
- Database issue
- Plugin conflict
503 Service Unavailable
Service temporarily unavailable.
Common causes:
- Server overload
- Maintenance mode
- Google service down
Customizing Error Messages
In Settings > OneTap Login > General > Error Messages:
| Error Type | Default Message | Customizable |
|---|---|---|
| access_denied | Access was denied... | ✅ Yes |
| popup_closed | The sign-in popup was closed... | ✅ Yes |
| network_error | A network error occurred... | ✅ Yes |
| email_exists | An account with this email... | ✅ Yes |
| generic_error | An error occurred... | ✅ Yes |
Debugging Tips
Enable Debug Logging
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Check Logs
# View recent errors
tail -100 /path/to/wordpress/wp-content/debug.log
Browser Console
- Open Developer Tools (F12)
- Go to Console tab
- Look for red errors
- Filter by "gsi" or "onetap"
Next Steps
- Google API Errors - Detailed Google errors
- Debug Mode - Enable logging
- Common Issues - Top 10 problems
- Support - Get help