{
  "slug": "stripe-login-adds-oauth-contexts-and-context-switching-6848c8622377",
  "title": "stripe login adds OAuth contexts and context switching",
  "tools": [
    "stripe-cli"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-13T20:12:39.000Z",
  "announced_at": "2026-08-13T20:12:39.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need to authorize Stripe CLI access or change the active account context, use `stripe login` and select a context with `stripe switch context`. Use `stripe login list` to view authorized contexts or `stripe reauth` to authorize additional accounts or sandboxes.",
    "examples": [
      "stripe login",
      "stripe switch context [<account_id>] [--live]",
      "stripe login list\nstripe reauth"
    ],
    "gotchas": [
      "Version: v1.45.3",
      "Availability: OAuth flow requires a flag on the server to be enabled.",
      "account_id: Authorized account ID to switch to. Without it, the CLI displays an interactive list of authorized accounts and modes.",
      "--live: Select livemode for the given account; otherwise a direct account switch defaults to test mode.",
      "Prerequisite: `stripe reauth` requires an existing OAuth session; run `stripe login` to authenticate first.",
      "Prerequisite: Browser-based login opens the Stripe Dashboard for approval; `stripe reauth` opens the Dashboard for renewed consent.",
      "`stripe logout` revokes the OAuth access token and clears credentials locally."
    ]
  },
  "why_it_matters": "Authorize Stripe CLI contexts and select the account, sandbox, or test or live mode for resource and development commands.",
  "sources": [
    "https://github.com/stripe/stripe-cli/releases/tag/v1.45.3",
    "https://github.com/stripe/stripe-cli/pull/1880",
    "https://raw.githubusercontent.com/stripe/stripe-cli/v1.45.3/pkg/cmd/login.go",
    "https://raw.githubusercontent.com/stripe/stripe-cli/v1.45.3/pkg/cmd/switch.go",
    "https://raw.githubusercontent.com/stripe/stripe-cli/v1.45.3/pkg/cmd/reauth.go"
  ],
  "rank": 0.90064,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-d0a3ca9b45004210-6:gate",
    "evidence_hash": "8ca8ceb792cfdb46f8ee480c6fc780c84ad80c8fa40e49b65fb9ca1ce9986bd2"
  },
  "review": {
    "draft_hash": "0a35b7d2dfb9f4ce3df9a184cdbc9612d65dd5152c1df4d17b5a77760201791c",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.90 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
