Skip to content

feat(auth): declare this device when signing in - #1590

Merged
ace331 merged 1 commit into
mainfrom
feat/auth-login-device-id
Nov 12, 2026
Merged

ace331 merged 1 commit into
mainfrom
feat/auth-login-device-id

Conversation

@ace331

@ace331 ace331 commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

What

future auth login (and the Desktop's own sign-in) now declare this installation with the device-code request:

  • device_id — the durable desktop_… identity already used for agent-session provenance and remote pairing
  • device_name — the OS machine name, the half a person recognizes

Best-effort: an unresolvable identity sends empty fields and login still succeeds; an older platform ignores the unknown keys. This is the client half of recording which device created an API key.

Test plan

  • new login_declares_this_device_to_the_platform captures the POST body and asserts both fields
  • cargo test -p future-host --lib device_identity (5) and future_login (8)
  • cargo test -p future-cli --lib commands::auth (31)
  • cargo clippy -p future-host -p future-cli --all-targets -- -D warnings

@ace331
ace331 enabled auto-merge (squash) November 12, 2026 02:09
`future auth login` and the Desktop's sign-in now send the durable
installation id (and the machine name) with the device-code request, so
the platform can record which device asked for the issued key. The
identity is best-effort: a login still succeeds with empty fields when
none can be resolved, and an older platform ignores the unknown keys.

Tests: the shared identity helper, plus a login test that captures the
POST body and checks both fields are present.
@ace331
ace331 force-pushed the feat/auth-login-device-id branch from 06ae161 to a26b3b4 Compare November 12, 2026 02:53
@ace331
ace331 merged commit 0d62b7d into main Nov 12, 2026
21 checks passed
@huichen
huichen deleted the feat/auth-login-device-id branch November 20, 2026 01:09
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