Skip to content

fix(core): preserve linked social identities during email sign-in - #1

Merged
zfy0701 merged 4 commits into
agentconnect-1.45from
zfy0701-preserve-social-bindings
Oct 24, 2026
Merged

zfy0701 merged 4 commits into
agentconnect-1.45from
zfy0701-preserve-social-bindings

Conversation

@zfy0701

@zfy0701 zfy0701 commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Signing in through a verified primary-email match can replace a manually linked account from the same social provider. Preserve that explicit binding and its stored tokens while allowing the alternate account to authenticate as the existing user. Exact identity ownership still takes precedence; explicit Link/Unlink and token refresh by the linked account continue to work.

Keep the change on the upstream v1.45.0 baseline without schema changes. Build images directly from the fork source and lockfile, verify them before publication, and tag each image with its full source commit. There is no build-time patch application.

Testing

  • Unit tests: 229 tests in seven existing suites pass, including sign-in, MFA, user-query, and identity-management cases updated for the guarded writer.
  • Integration tests: real PostgreSQL verifies identity/token preservation, exact-identity ownership, unknown-email rejection, new-provider linking, and concurrent Link/Unlink versus delayed sign-in/token writes.
  • Tested locally: a test installation completed linked Google account -> primary-email-matching alternate Google account -> linked account through real OAuth. All three reached the same original user. After the alternate login, the full identity-details fingerprint, token row, metadata, and encrypted-content fingerprint were unchanged. The linked account could then update its own token. Existing memberships were retained and no duplicate user was created.

The live OAuth grant returned an access token only, so live refresh-token behavior was not exercised; the PostgreSQL harness also verifies preservation of the complete stored token payload.

Build and rollout

The fork verification and image publication jobs passed. Both replicas in the test installation run the source image built from bd2bdc5d4bf091a1943fcfac4ce66022214cab15; the six changed runtime modules were checked against the fork source inside both replicas. The later commit only broadens the workflow's branch trigger and is excluded from the Docker build context. The application repository was not changed, and no staging or production rollout was performed.

Created by Codex . GPT-6

@zfy0701
zfy0701 merged commit bac728f into agentconnect-1.45 Oct 24, 2026
4 checks passed
zfy0701 added a commit that referenced this pull request Nov 14, 2026
Preserve explicitly linked social identities and stored tokens during verified-email sign-in with another account from the same provider. Serialize identity and token writes against concurrent Link/Unlink operations.

Build and publish the fork directly from its source. Validation covers 229 existing tests, real PostgreSQL concurrency cases, and live Google sign-in with both accounts in a test installation.

Created by Codex . GPT-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant