userinfo: HTTP 200 sparse address rejected by SDK validator (CLI 0.27.0)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with packages/sdk/src/resources/user-info.ts, especially the userInfoSchema declaration and retrieve() parsing path cited in the report. Compare the schema with the documented API address contract and inspect or add offline fixtures for sparse, absent, null, complete, and invalid address values. Done means the API and SDK behavior agree and the regression cases pass; the issue leaves which side should change unresolved.
索引モデルが issue の本文から書いたものです。
説明
Summary
With @stripe/[email protected], an approved userinfo:read device-flow session received HTTP 200 from GET https://api.link.com/userinfo, but user-info retrieve exited 1 because the response address omitted required SDK fields.
Among the SDK's named address fields, country was a string while line1, city, state, and postal_code were absent. Only field presence and types were retained; unknown fields were not retained. The actual response body and all account values are omitted from this report.
Environment and invocation
- Official npm package
@stripe/[email protected]; unchanged bundleddist/cli.js, invoked directly with Node. - macOS; Node.js 24.20.0.
- Device login completed with the granted scope verified as exactly
userinfo:read; no extra authorization details. - A separate auth file was selected with documented
--auth.LINK_NO_REFRESH=1was set, and no token refresh occurred.
Equivalent CLI arguments are below. $AUTH_FILE represents the same private absolute auth-file path in both commands; the display label is replaced with a generic example. These are documentation of the completed flow, not a request for credentials:
LINK_NO_REFRESH=1 link-cli --auth "$AUTH_FILE" auth login \
--client-name "Example agent" --scope userinfo:read
# Owner completes the device authorization and the CLI obtains the grant.
LINK_NO_REFRESH=1 link-cli --auth "$AUTH_FILE" --format json --full-output \
user-info retrieve
For the diagnostic read, a local guard permitted one GET to the official userinfo endpoint and prevented other network requests. It added redirect: 'error', inspected a bounded clone for field names/types, and returned the original Response unchanged. An offline mock test confirms response identity, body bytes, method, and headers are preserved. No redirect or blocked extra request occurred in the observed HTTP 200 read. The vendor schema failure also reproduces offline without that guard, authentication, or network.
Actual result
HTTP 200
CLI exit code 1
UNKNOWN
Invalid response while attempting to retrieve user info (200)
Retained validation details identify address.city, address.state, and address.postal_code as expected string / received undefined. The diagnostic's initial path filter did not retain digit-containing line1; its absence was recorded by the field-shape check and independently confirmed as a fourth validation failure by the offline fixture below.
Synthetic offline reproduction
The following is a minimal synthetic fixture, not the actual account response:
{"address":{"country":"ZZ"}}
Evaluating the exact userInfoSchema declarations extracted from the unchanged published CLI bundle rejects it with four missing-field paths:
address.city
address.line1
address.postal_code
address.state
Five offline fixture cases were checked: country-only fails at those four paths; omitted whole address passes; null whole address passes; required components explicitly null with a string country passes; adding optional line2: null to the sparse object still fails.
Documentation/source check and expected behavior
The CLI README's login/user-info flow does not state that a complete profile address, payment method, guided onboarding, or purchase is required before retrieving user info. It describes omitted/null address enrichment. userinfo:read is the documented identity scope.
The released validator requires line1, city, state, postal_code, and country as nullable strings; only line2 is optional. The checked current validator has identical bytes. retrieve() parses successful JSON through this schema.
Please clarify and align the API/SDK address contract. If omitted components are supported, the SDK should preserve omissions while validating present values. If all components are required, the successful API response should supply the required nullable fields. The reviewed public documentation does not explicitly guarantee a country-only address, so this report identifies an observed response/validator mismatch rather than assuming which side must change.
Suggested regression fixtures: sparse/country-only, whole address absent, whole address null, complete address, and invalid present component types.
No account identifiers, profile values, tokens, authorization codes, local private paths, or raw account responses are included. No payment or account-profile modification was attempted. Issue #406 concerns refresh HTTP 400 and is a different failure.
- 主要言語
- TypeScript
- スター
- 842
- フォーク
- 136
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 88
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stripe/link-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Device-flow refresh token rejected immediately: 400 "refresh_token is invalid" on first refreshオープン
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
stripe/link-cli#406 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bunx hangs after link-cli commands by implicitly starting a development server対応中かも @awesamarth が 34 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
stripe/link-cli#294 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
stripe/link-cli の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dsh-market/dsh-market#877 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
stellar/stellar-dev-skill#151 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:arcade game ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
fderuiter/deruiter.dev#2281 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
scope: data grid type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信