Skip to content

Review the placement or whether we should place the Sign in with Google prompt on the email verification page #10201

@jamesozzie

Description

@jamesozzie

Bug Description

On the email verification page, if a user chooses to sign in with their email and password, using an email that is not verified, they'll land on the core email verification page. On this page, the Sign in with Google prompt appears below the content, and it may not be required given the user decided not to Sign in with Google immediately prior to this screen.

Image


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The "Sign in with Google" button (and one-tap) should not appear on the "Please verify your email is correct" WordPress interstitial screen.

Implementation Brief

  • Add a guard in Sign_In_With_Google::register_tag() to skip tag registration on the WordPress email‑verification page:
    • Use the existing Context input to read the action query param (confirm_admin_email) and return early before instantiating or registering Web_Tag.
    • This prevents both the inline button markup and the One Tap prompt from rendering on wp-login.php?action=confirm_admin_email.
  • Keep all other login and frontend behavior unchanged by limiting the guard to the confirm_admin_email action only (the rest of register_tag() stays as‑is).
    Test Coverage

Test Coverage

  • Add a test in Sign_In_With_GoogleTest.php that sets $_GET['action'] = 'confirm_admin_email' and $_SERVER['SCRIPT_NAME'] = wp_login_url(), calls register_tag(), then asserts the login_footer output does not contain the SIWG marker string (Sign in with Google button added by Site Kit). This verifies the prompt is suppressed on the interstitial without affecting other contexts.

QA Brief

  • Connect Sign in with Google with a valid Google client ID.
  • Expire the WordPress admin email check using the following WP CLI command: wp option update admin_email_lifespan 1. Log out, then log back in as an admin. WordPress redirects to wp-login.php?action=confirm_admin_email. Verify the SIWG button does NOT render below the "Please verify your email is correct" prompt.
  • Enable One Tap in Site Kit -> Sign in with Google settings and repeat the previous step. Verify the One Tap prompt also does NOT appear on the interstitial.
  • Verify the standard login page still renders the SiwG button and (with One Tap enabled) the One Tap prompt.
  • With WooCommerce active, verify its login page (/my-account/) still renders the SiwG button.
Screenshots Image

Changelog entry

  • Hide Sign in with Google button on email verification pages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module: Sign in with GoogleSign in with Google (SiwG) related issues.P2Low priorityTeam SIssues for Squad 1Type: EnhancementImprovement of an existing feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions