Skip to main content

Error Messages

OneTap Login displays error messages when something goes wrong during the sign-in process. You can customize all 5 error messages to match your brand voice and provide helpful guidance.

Available Error Messages

The plugin handles 5 distinct error scenarios:

Error TypeWhen It Occurs
Access DeniedUser denies permission in Google popup
Popup ClosedUser closes popup before completing
Network ErrorConnection issue to Google servers
Email ExistsEmail conflict (PRO setting)
Generic ErrorAny other unexpected error

Settings Error Messages Section

Error Message Details

1. Access Denied

Default message: "Access was denied. Please try again."

When it appears:

  • User clicks "Deny" on Google's permission screen
  • User chooses not to share their information
  • Organization policy blocks sign-in

Technical cause: error=access_denied in OAuth response

Customization tips:

  • Reassure users their data is safe
  • Explain why you need the information
  • Offer alternatives

Example customizations:

"No worries! You can sign in with email and password instead."

"Permission is needed to create your account. Please try again if you'd like to use Google sign-in."

"Sign-in cancelled. Use the form below to log in with your password."

2. Popup Closed

Default message: "The sign-in popup was closed."

When it appears:

  • User closes the Google popup window
  • Popup blocked by browser
  • User navigates away during sign-in

Technical cause: Popup window closed before completion

Customization tips:

  • Keep it friendly and non-blaming
  • Encourage trying again
  • Mention popup blockers if common issue

Example customizations:

"The sign-in window was closed. Click the button to try again!"

"Oops! The popup was closed before sign-in completed. Please try again."

"Sign-in interrupted. If your browser blocked a popup, please allow it and try again."

Error Message Popup Closed

3. Network Error

Default message: "Network error. Please check your connection."

When it appears:

  • User's internet connection dropped
  • Google servers unreachable
  • Firewall blocking the connection
  • Server-side timeout

Technical cause: Failed HTTP request to Google APIs

Customization tips:

  • Don't blame the user
  • Suggest actionable steps
  • Keep it simple

Example customizations:

"Connection issue detected. Please check your internet and try again."

"We couldn't reach Google. Please refresh the page and try again."

"Network hiccup! Make sure you're connected to the internet."

4. Email Exists

Default message: "This email is already registered. Please sign in with your password."

When it appears:

  • Google email matches existing WordPress user
  • Account merge disabled
  • User needs to use original login method

Technical cause: Email already in wp_users table

Customization tips:

  • Clearly explain the situation
  • Direct user to proper action
  • Mention password reset if relevant

Example customizations:

"You already have an account! Please sign in with your email and password."

"This email is registered. Use your existing password or click 'Forgot Password'."

"Account found! Sign in with your password, or reset it if you've forgotten."

Error Message Email Exists

PRO Feature

With OneTap Login PRO's Account Merge feature, you can allow users to link their Google account to existing accounts instead of showing this error.

5. Generic Error

Default message: "An error occurred. Please try again."

When it appears:

  • Unexpected server error
  • Invalid token from Google
  • Plugin configuration issue
  • Any unhandled error

Technical cause: Various unexpected conditions

Customization tips:

  • Keep it simple
  • Suggest trying again
  • Provide contact option for persistent issues

Example customizations:

"Something went wrong. Please try again or contact support."

"Unexpected error! Please refresh the page and try again."

"Oops! We hit a snag. Try again, or use email/password to sign in."

Configuring Error Messages

Step 1: Access Settings

  1. Go to Settings > OneTap Login
  2. Scroll to Error Messages section (General tab)

Step 2: Edit Messages

  1. Locate the error type you want to customize
  2. Enter your custom message
  3. Keep messages concise (under 100 characters recommended)

Step 3: Save Changes

  1. Click Save Changes
  2. Test by triggering each error scenario

Error Display

How Errors Appear

Errors are displayed:

  • Below the sign-in button
  • In a styled error box
  • Red/warning color scheme
  • Auto-dismiss after 10 seconds (optional)

Error Styling

Default error display:

<div class="onetap-error-message">
<span class="error-icon"></span>
<span class="error-text">Your custom message here</span>
</div>

Custom CSS (Optional)

Style error messages to match your theme:

.onetap-error-message {
background-color: #FEF2F2;
border: 1px solid #EF4444;
border-radius: 4px;
padding: 12px 16px;
margin: 10px 0;
color: #991B1B;
}

.onetap-error-message .error-icon {
margin-right: 8px;
}

Best Practices

Do's

  • Be helpful: Tell users what to do next
  • Be friendly: Avoid technical jargon
  • Be brief: Keep messages short and scannable
  • Be consistent: Match your brand voice

Don'ts

  • Don't blame users: "You closed the popup" → "The popup was closed"
  • Don't be technical: "OAuth error 401" → "Sign-in couldn't complete"
  • Don't be vague: "Error" → "Connection issue. Please try again."
  • Don't be scary: "Critical failure!" → "Something went wrong."

Error Prevention

Reduce Access Denied Errors

  1. Use clear button text ("Continue with Google")
  2. Explain benefits of Google sign-in
  3. Ensure privacy policy is accessible

Reduce Popup Closed Errors

  1. Test with popup blockers
  2. Provide clear instructions
  3. Consider alternative flow for popup-blocked users

Reduce Network Errors

  1. Use reliable hosting
  2. Don't block Google domains in firewall
  3. Check server outbound connections

Reduce Email Exists Errors

  1. Enable Account Merge (PRO)
  2. Provide clear forgot password links
  3. Consider auto-linking by email

Testing Error Messages

How to Trigger Each Error

ErrorHow to Test
Access DeniedClick "Deny" on Google permission screen
Popup ClosedClose the Google popup window
Network ErrorDisconnect internet during sign-in
Email ExistsUse Google with existing account's email
Generic ErrorHard to trigger intentionally

Testing Checklist

  • All 5 messages customized
  • Messages display correctly
  • Styling matches your theme
  • Messages are helpful and clear
  • Mobile display checked

Localization

Error messages support WordPress localization:

Translating Messages

Messages entered in settings are not automatically translated. For multilingual sites:

Option 1: Use a translation plugin

  • WPML
  • Polylang
  • TranslatePress

Option 2: Keep messages language-neutral

"Sign-in cancelled. Try again?"

Option 3: Use simple universal phrases

"❌ Error. ↻ Try again."

Settings Reference

Error TypeSetting FieldMax Length
Access Deniederror_access_denied200 chars
Popup Closederror_popup_closed200 chars
Network Errorerror_network200 chars
Email Existserror_email_exists200 chars
Generic Errorerror_generic200 chars

Next Steps