This article covers common issues with the Google Login Plugin and how to resolve them.
Sign in with Google button is not appearing
Possible causes:
- Plugin not configured — Go to Settings → Company → Plugins → Google Login Plugin → Manage and verify the Client ID and Secret are saved.
- Not on the login page — The button only appears on the client portal login page when the user is not already logged in.
- Admin portal — The button does not appear on the admin portal, only the client portal.
- HTTP_HOST not set — If your server does not set
HTTP_HOST (e.g., CLI environments), the button will not render.
Redirect URI mismatch error from Google
Error: redirect_uri_mismatch or Error 400: redirect_uri_mismatch
Fix: The redirect URI in your Google Cloud Console credentials must exactly match what the plugin uses.
- Go to Google Cloud Console → Credentials
- Open your OAuth 2.0 Client ID
- Under Authorised redirect URIs, add:
https://your-domain.com/cp/plugin/google_login/
- Check for trailing slashes — the URI must match exactly, including the trailing
/
- Check the protocol is
https:// not http://
- Save and wait a few minutes for Google to propagate the change
Invalid session state error
Error: Invalid session state. Please try signing in again.
Cause: The CSRF state token stored in the session did not match the one returned by Google. This can happen if:
- The session expired between initiating login and completing it
- Cookies are blocked by the browser
- A second login attempt was started before the first completed
Fix:
- Ensure cookies are enabled in the browser
- Try again — the error clears itself on a fresh attempt
- Check your Blesta session timeout settings if this happens frequently
User not found error
Error: No account found for this email address.
Cause: The Google account's email address does not match any client account email in Blesta.
Fix: The client must use the same email address in their Blesta account as their Google account. You can update the client's email in Blesta Admin → Clients → [Client] → Edit.
Token exchange failed
Error: Failed to exchange authorization code for tokens.
Possible causes:
- Incorrect Client Secret — Verify the secret in plugin settings matches Google Cloud Console exactly
- Client ID mismatch — Verify the Client ID in plugin settings matches Google Cloud Console exactly
- OAuth consent screen not configured — In Google Cloud Console, ensure the OAuth consent screen is published (not in testing mode) or your users are added as test users
- Redirect URI not registered — See Redirect URI mismatch above
Google denied / cancelled
Error: Google sign-in was cancelled or denied.
Cause: The user clicked Cancel or denied permission on the Google authorisation screen.
Fix: This is user action, not an error. The user can try again.
One Tap / automatic sign-in no longer works
This is expected. Version 2.0 removed the Google Identity Services JavaScript widget, which provided One Tap. The new implementation uses a standard button click redirect flow.
Getting further help
If you continue to experience issues, please open a support ticket with:
- Your Blesta version
- Your PHP version (
php -v)
- The exact error message displayed
- Whether the issue is reproducible in an incognito window