Skip to content

[bug] Another account can deny a TV sign-in someone already approved #2897

Closed

Description

@Rhainland

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

  1. POST /api/v2/auth/device/start as a TV.
  2. Approve the code as account A (POST /api/v2/auth/device/approve).
  3. Before polling, call POST /api/v2/auth/device/approve as account B: 409.
  4. Call POST /api/v2/auth/device/deny as account B: 200 {"status":"denied"}.
  5. 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 main while 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

  1. added
    bug
    impact: security
    needs-review
    priority: P2
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugimpact: securityneeds-reviewpriority: P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions