Skip to content

Google Sign-in

Google Sign-in adds Sign in with Google to your WordPress site using OAuth OpenID Connect. Visitors click a familiar button, authenticate with Google, and land back on your site - with optional automatic account creation for new users.

  • Uses Google OAuth/OIDC (openid email profile) once Client ID and Client Secret are saved.
  • Shows a Google button on the login screen (and optionally WooCommerce login).
  • Supports shortcodes [google_sign_in] and [social_login providers="google"].
  • Callback URL uses ?wpps_auth=google on your site home (register this URI in Google Cloud).
  • Optional auto-register, default role, store Google avatar URL, redirect after login, and button style/display.
  • Warns when the site is not on HTTPS - providers expect a secure callback.

Until Client ID and Client Secret are both set, the module does not boot the sign-in UI or callback handling.

  • You want fewer passwords for members or customers.
  • You’re already using (or planning) other social providers via the unified shortcode.
  • Shoppers should sign in with Google on WooCommerce My Account.

Open the module’s advanced settings (gear icon):

Setting Key Notes
Client ID client_id Required. From Google Cloud OAuth client.
Client Secret client_secret Required.
Button style button_style default (Filled), outline, or minimal.
Label & icon button_display label (text + icon) or icon.
Inline row button_label_inline Optional layout for text + icon.
Auto-register auto_register Create a WP user on first Google sign-in.
Default role default_role subscriber (default), contributor, author, or editor.
Store avatar URL store_avatar_url On by default; stores Google profile image meta.
Redirect after login redirect_after_login Optional destination after Google sign-in.
WooCommerce login woo_login Show the button on WooCommerce login.

Copy the redirect URI shown in settings into Google Cloud -> Authorized redirect URIs. Public callback form: https://your-site.com/?wpps_auth=google.

  • [google_sign_in] - Google-only button.
  • [google_sign_in style="outline"] - style override.
  • [social_login providers="google"] - unified social shortcode.
  1. Create OAuth 2.0 credentials in Google Cloud Console.
  2. In WordPress: WP PowerSuite -> Modules -> Google Sign-in - turn on.
  3. Open settings, paste Client ID and Client Secret, add the redirect URI in Google Cloud, then save.
  4. (Optional) Enable auto-register, WooCommerce login, and button styling.
  1. Log out and open wp-login.php (or a page with [google_sign_in]).
  2. Click Sign in with Google and complete Google’s consent screen. ✅ Existing linked user: signed in.
  3. ✅ New user with auto-register on: account created with the default role.
  4. ❌ Error / no button: confirm credentials, HTTPS callback URI, and that both ID and secret are saved.
  5. If Store avatar URL is on, confirm the Google photo appears (unless a Local User Avatar upload exists - local wins).
  • No Google button. Client ID/secret missing or empty - module won’t boot social hooks until both are set.
  • redirect_uri_mismatch. The URI in Google Cloud must exactly match the one shown in module settings (?wpps_auth=google).
  • Works on HTTPS staging but not HTTP local. Use HTTPS (or a tunnel) and register that callback.
  • New users not created. Turn on Auto-register (and allow the chosen role).
  • Wrong landing page. Set Redirect after login, or use Redirect After Login for site-wide rules.
What do I need to enable Google Sign-in?

A Google Cloud OAuth 2.0 Client ID and Client Secret, plus the module's redirect URI added in the Google Cloud Console. HTTPS is strongly recommended.

What shortcodes are available?

Use [google_sign_in] for Google alone, or [social_login providers="google"] for the unified social login shortcode.

Does Google Sign-in create new WordPress users?

Only when Auto-register is enabled. New users get the Default role you choose (subscriber, contributor, author, or editor).

Does a local avatar override the Google profile photo?

Yes. If Local User Avatar has an upload for that user, the local image wins over the stored Google avatar URL.

Developer notes (hooks & filters)

Source: modules/google-sign-in/module.php, Provider.php, Config.php, AvatarDisplay.php, admin.php. Boot: critical. Uses SocialSignInModuleTrait.

  • OAuth endpoints: Google auth / token / userinfo; scopes openid email profile.
  • Callback query param: wpps_auth=google (UrlHelper::AUTH_QUERY_PARAM).
  • Legacy AJAX callback still documented in admin for older setups.
  • Avatar meta: wpps_google_avatar. Local meta powersuite_avatar takes precedence (AvatarDisplay on get_avatar priority 20).
  • Filter: wpps_google_avatar_img_attributes.
  • Shortcodes: legacy google_sign_in; unified social_login.
  • HTTPS notice via SettingsUiHelper::renderHttpsNotice().