Skip to content

Show the PIN lockout when verify-pin returns 429 #494

Open

Description

@Rhainland

Silo-Server/silo-server#2021 locks a profile for five minutes after five wrong PINs. During the lockout, POST /api/v2/profiles/{id}/verify-pin (and v1 POST /api/v1/profiles/{id}/verify-pin) answer 429 with a Retry-After header in seconds; v2 uses the existing rate_limited problem, v1 {"error":"rate_limited","message":"Too many incorrect PINs. Try again later."}. The correct PIN is refused too while the profile is locked.

What the app should do

Wherever the app checks a profile PIN (profile picker, profile management, any parental-control PIN prompt), treat 429 as a lockout rather than a wrong PIN: show a message such as "Too many incorrect PINs. Try again in N minutes." using Retry-After (rounded up to whole minutes, falling back to "later" when the header is missing), and don't count it as another wrong attempt in the UI. The web app's wording, from #2021, is "Too many incorrect PINs. Try again in N minutes."

Today

The PIN screens show the server's problem detail on 429 (checked on #493); ApiResult.Error does not carry Retry-After yet, so it needs passing through.

AI disclosure: drafted with Claude Code (claude-opus-5-5) at the maintainer's direction; human verified.

Activity

  1. Rhainland commented on Oct 7, 2026

    @Rhainland
    ContributorAuthor

    Server PR Silo-Server/silo-server#2021 now declares verifyProfilePIN as non_retryable: replaying a wrong PIN counts as another lockout attempt. Please set nonRetryable = true in ProfileApi.verifyPin, which currently calls exchange with its default false, so the request receives singleAttempt(). Keep 429 handling separate from automatic transport retries. This can be handled with the lockout response work in this issue.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions