Skip to content

"Different account detected" screen is unreachable #37

Done

Description

@saqibmanan

What: Signing in with a second Google identity whose email matches an account already linked to Google returns HTTP 409, and the user sees the generic error page. LoginIdpLinkConfirmOverride.tsx never renders in this flow.
Evidence: error="identityProviderAlreadyLinkedToCurrentUserMessage"
Fix: not fixed — confirm which Keycloak flow should reach the override page, or drop the screen.

Activity

  1. self-assigned this
    on Sep 25, 2026
  2. added
    bug
    on Sep 25, 2026
  3. added theissue type on Sep 25, 2026
  4. saqibmanan commented on Sep 25, 2026

    @saqibmanan
    ContributorAuthor

    Repro: account already linked to Google identity A; sign in with Google identity B that has the same email → Existing account found → Continue with Google → email link.

    Observed: HTTP 409 on /broker/after-first-broker-login, event IDENTITY_PROVIDER_LOGIN_ERROR, error=identityProviderAlreadyLinkedToCurrentUserMessage; UI shows "Google sign-in failed".
    login-idp-link-confirm-override.ftl ("Different account detected") never rendered in any flow tried.

  5. saqibmanan commented on Nov 26, 2026

    @saqibmanan
    ContributorAuthor

    Checked locally on Keycloak 26.7 with the released theme (#48): mock OIDC provider under the alias google, an account linked to identity A, then a sign-in as identity B with the same email.

    Realm Pages Result
    Before Step 5 (first broker login) Existing account found → email link → error.ftl "Your account is already linked to the identity provider google."
    After Step 5 (first broker login with override, Confirm override existing link Required, last) Existing account found → email link → Different account detected → confirm Back to the app, account now linked to identity B

    So Step 5 in REALM-CHANGES.md fixes this. The service account can't read prod's identity-provider settings (403), so prod still needs a manual check: sign in with a Google account whose email matches a CivicDataSpace account that is already linked to a different Google account. Keeping this open until then.

  6. saqibmanan commented on Nov 26, 2026

    @saqibmanan
    ContributorAuthor

    Realm Step 5 applied on prod (2026-11-26). The Google provider's First login flow override is now first broker login with override, with Confirm override existing link set to Required as the last step in Handle Existing Account. That's the same setup that reached "Different account detected" in the local check above. To undo it, set the override back to first broker login.

  7. saqibmanan commented on Nov 26, 2026

    @saqibmanan
    ContributorAuthor

    Verification status at close:

    • Verified: the prod flow matches the local test step for step (Keycloak 26.7, released theme). Locally, the error turns into "Different account detected" and the sign-in completes.
    • Not verified: a real Google round trip on prod. The local test used a stand-in OIDC provider under the alias google. The service account can't read prod's IdP or flow settings (403), so settings like Trust email weren't checked.
    • Effect on normal sign-ins: none expected. The new step only acts when the account is already linked to a different Google account; first-time and same-account Google sign-ins follow the old path.
    • Undo: Identity providers → google → First login flow override → first broker login.

    Reopen if a real case shows the old "already linked" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions