Skip to content

Compare agents by identity when checking them against the account - #1783

Closed
joepio wants to merge 1 commit into
developfrom
claude/project-thread-u8vgm0-signin
Closed

joepio wants to merge 1 commit into
developfrom
claude/project-thread-u8vgm0-signin

Conversation

@joepio

@joepio joepio commented Sep 25, 2026

Copy link
Copy Markdown
Member

Before: someone signed in to atomic.place whose recovery backup was saved before the did:ad: → atomic: rename (or whose secret was exported before it) opened the app and was sent to sign in again, because the reconcile gate thought the agent on the device was a different one from the account's. Signing in with their secret then ended the account session ("that secret belongs to a different one"), which also signs them out of atomic.place, since the portal and the app share the session cookie.

After: did:ad:agent:X and atomic:agent:X count as the same agent everywhere the app checks the device's agent against the account. The gate leaves the user in the app, and the secret sign-in only ends the account session when the secret really is another agent's.

How: #1664 already fixed this comparison inside recovery.ts with a sameAgent helper built on canonicalIdentifier. It is now exported and used in reconcile.ts (backup, enrollment and binding checks), in releaseConflictingPortalSession in GettingStartedFlow.tsx, and in the two places that match the cached backup to the agent (AccountRecoveryCard.tsx, SyncRoute.tsx). New tests in reconcile.test.ts cover both spellings and a genuinely different agent. The two spelling tests fail without the change.

Related Issues

Reported sign-out on atomic.place after entering the secret in the app (25 Sep).

Checklist

  • Add changelog entry linking to issue, describe API changes
  • Add or update tests if needed
  • Update docs if needed

Generated by Claude Code

A recovery backup saved before the did:ad: to atomic: rename names the
agent as did:ad:agent:..., and a secret exported before it still decodes
to that spelling, while a newer one decodes to atomic:agent:.... The
reconcile gate and the secret sign-in compared the strings, so one agent
looked like two: opening the app while signed in to atomic.place archived
the local identity and sent the user to sign in, and signing in with the
secret then ended the account session, which signs out of atomic.place
too because the session cookie is shared.

#1664 fixed the same comparison inside recovery.ts. Export its sameAgent
and use it in reconcile.ts, the secret sign-in's conflicting-session
check, and the two places that match the cached backup to the agent.
joepio added a commit that referenced this pull request Sep 25, 2026
# Conflicts:
#	browser/CHANGELOG.md
joepio added a commit that referenced this pull request Sep 25, 2026
#1826, #1787, #1783, #1791, #1840, #1841) (#1844)

Combined batch, green on Mancave in run 4645 on 3346a6c (CI and Downstream).

Includes #1826, #1787, #1783, #1791, #1840 and #1841, plus settled
translation catalogs.

joepio commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

Landed on develop in ef161c3 via the combined batch #1844 (green on Mancave, run 4645). Closing.


Generated by Claude Code

@joepio joepio closed this Sep 25, 2026
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