Skip to content

[Bug] OAuth login expires or aborts with an unhelpful recovery message #2

Description

@LIghtJUNction

Problem

Pi login can fail with:

lmm.best
授权 Pi

请求已过期、账号已切换或无权访问。请从 Pi 重新发起登录。

or:

Error: Failed to login to LMM: This operation was aborted

This is especially easy to trigger after OAuth scopes change (for example adding usage:read) or when Pi has a stale/expired local grant. The current message does not tell the user whether the browser authorization expired, the account changed, the callback timed out, or the server rejected the grant.

Expected behavior

  • Detect stale credentials before model use and request a clean re-login.
  • Treat a missing/expired scope as a recoverable reauthorization, not a generic abort.
  • Distinguish user cancellation from callback timeout and server-side authorization rejection.
  • Clear or quarantine only the stale provider credential; do not affect other providers.
  • Explain that an existing grant may need /logout followed by /login.

Acceptance criteria

  • Tests cover expired access tokens, revoked grants, account/session changes, expired browser transactions, and user cancellation.
  • The UI displays a stable recovery message rather than only operation was aborted.

Activity

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