Repository navigation
Description
What happened
Once one account approves a TV's device sign-in, a second account's approve is refused with 409 ("approved by another identity"), but its deny succeeds. The deny clears the first approval and the request ends denied, so the TV never signs in.
Anyone who has the eight-digit code (it is on the TV screen and in the QR link) can therefore cancel a sign-in someone else just approved, as long as they act before the TV's next poll collects it. That window is the poll interval, about 3 seconds, so this is unlikely in practice. It does not sign anyone in: it fails closed.
Deny has accepted approved requests since the initial migration; the asymmetry with approve may be intended. If it is, a short note in docs/architecture/device-login.md ("Who decides") would settle it.
Steps to reproduce
POST /api/v2/auth/device/startas a TV.- Approve the code as account A (
POST /api/v2/auth/device/approve). - Before polling, call
POST /api/v2/auth/device/approveas account B: 409. - Call
POST /api/v2/auth/device/denyas account B: 200{"status":"denied"}. - Poll as the TV:
denied, no tokens.
Expected behavior
Either deny by another identity is refused with 409 like approve, or the docs say that any signed-in account may withdraw an uncollected approval.
Silo version / commit
main at 3bc9e58c5
Deployment
Docker (other)
Area
Accounts, profiles, and sign-in
Clients affected
- Other/not client-specific
Relevant logs
None; reproduced through the API on a sandbox server.
Technical notes
DeviceLoginService.Deny in internal/auth/device_login.go updates rows in pending or approved without checking approved_by_user_id; Approve returns ErrDeviceLoginConflict for another identity.
AI harness
Claude Code in T3 Code
AI tool(s)
Claude Code
AI model(s)
claude-opus-5-5
AI involvement
AI-assisted
Independent or adversarial review
n/a
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment (reproduced by the AI agent on a sandbox server built from
mainwhile validating [v1] TV client sign-in & onboarding #1192) - Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Activity