Skip to content

Read LPM CLI logins keyed without the registry's trailing slash - #3

Merged
tolgaergin merged 2 commits into
mainfrom
auth/canonical-registry-keychain-account
Nov 8, 2026
Merged

tolgaergin merged 2 commits into
mainfrom
auth/canonical-registry-keychain-account

Conversation

@tolgaergin

@tolgaergin tolgaergin commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Change

LPM CLI now keys logins by the registry URL without trailing slashes (lpm-dev/rust-client#1113), so https://lpm.dev/ and https://lpm.dev share one keychain account.

  • getKeychainAccount trims trailing slashes before hashing.
  • For a slashed LPM_REGISTRY_URL, getToken also tries the account that CLI releases before 0.86 used for that spelling. This version therefore reads logins stored by both older and newer CLIs.

Tests

  • The known-answer vector for https://lpm.dev/ now matches the trimmed account, as the CLI's vectors do.
  • New test: reads a login an older LPM CLI stored under the trailing-slash registry.
  • npm test: 320 tests pass. biome check is clean.

Council review follow-up

  • The trailing-slash account is tried after the canonical one whichever way LPM_REGISTRY_URL ends, since an older CLI's --registry https://lpm.dev/ login stays there until the new CLI reads it. Test: reads a login an older LPM CLI stored under the trailing-slash spelling of the default registry.

🤖 Generated with Claude Code

LPM CLI now keys logins by the registry URL without trailing slashes, so
https://lpm.dev/ and https://lpm.dev share one keychain account. The MCP
server derives the account the same way, and for a slashed
LPM_REGISTRY_URL also tries the account earlier CLI releases used for that
spelling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A login an older LPM CLI made with `--registry https://lpm.dev/` stays under
the slashed account until the new CLI reads it, so the MCP server tries that
account after the canonical one whether or not LPM_REGISTRY_URL ends with a
slash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tolgaergin
tolgaergin merged commit ad1c27f into main Nov 8, 2026
2 checks passed
@tolgaergin tolgaergin mentioned this pull request Nov 8, 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