Skip to content

flyctl auth login succeeds but all commands fail with 'You must be authenticated to view this' #4913

@bxclib2

Description

@bxclib2

Bug Description

flyctl auth login succeeds (logs in as user), but any subsequent command (apps list, orgs list, apps create) fails with:

Error: failed to run query(...): You must be authenticated to view this.

With warning: Metrics send issue: metrics send failed with status 401

Steps to Reproduce

  1. rm -rf ~/.fly
  2. flyctl auth login → opens browser, login succeeds
  3. flyctl auth whoami → fails with "You must be authenticated"
  4. flyctl apps list → fails with "You must be authenticated"

Expected Behavior

After flyctl auth login, CLI commands should work without requiring a separate Personal Access Token.

Environment

  • flyctl v0.4.33 and v0.4.52
  • macOS arm64
  • Account in good standing, no SSO

Additional Notes

  • flyctl auth token returns a token starting with fm2_
  • Using that token with Fly Machines API returns: "all tokens missing third-party discharge tokens; no verified tokens"
  • flyctl auth logout says "Unable to revoke token"
  • The user CANNOT create Personal Access Tokens from dashboard (org requires SSO for token creation)

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