bug: Better Auth account-info rejects useAccountCookie over HTTP (upstream better-auth#10911)
Maintainer thường phản hồi trong vòng 1 ngày
@mustafaskyer đang làm issue này rồi.
Từ ngày 1/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Area
Providers and integrations
RELKIT version
@relkit/better-auth 0.8.3 (workspace main), with better-auth 1.7.1
Tracking issue for an upstream Better Auth bug that RELKIT apps hit through the API reference. The defect is in Better Auth, not RELKIT; this issue stays open until the upstream fix ships and we have verified it here.
Upstream
- Issue: better-auth/better-auth#10911 —
accountInfo(GET) rejectsuseAccountCookie: true - Fix: better-auth/better-auth#10918 — open, awaiting review
account-info shares an account-selection schema with POST endpoints and declares useAccountCookie: z.literal(true). A GET query value always arrives as text, so ?useAccountCookie=true sends "true" and can never match. get-session does not have this problem because its booleans use z.coerce.boolean().
Minimal reproduction
- In a RELKIT app with Better Auth, sign in with
POST /api/auth/sign-in/email. - Open the API reference (
relkit inspector→ Scalar, or the app's own reference) and sendGET /api/auth/account-info?useAccountCookie=true.
The same request against a plain betterAuth() instance with no RELKIT code returns the same error, which confirms the defect is upstream.
Expected behavior
?useAccountCookie=true passes validation and selects the account from its signed OAuth cookie, as the Better Auth docs describe.
Actual behavior and logs
GET /api/auth/account-info?useAccountCookie=true
400 {"code":"VALIDATION_ERROR","message":"[query] Must match one of 2 shapes: (accountId: required, expected string, useAccountCookie: not accepted in this shape) or (useAccountCookie: expected true, received the text \"true\")"}
Plain Better Auth returns [query] Invalid input; the field-level wording above comes from RELKIT's validation detail in packages/better-auth/src/validation-detail.ts.
Environment
Bun 1.3.10, macOS (Darwin 24.6.0, arm64)
To close this issue
- Better Auth releases a version that includes the fix (better-auth/better-auth#10918 or an alternative).
- Bump
better-authin the workspace catalog and the CLI build catalog. - Re-run the reproduction:
GET /api/auth/account-info?useAccountCookie=truepasses validation (with no OAuth account cookie it should then fail with an account error, notVALIDATION_ERROR). - Update
packages/better-auth/tests/validation-detail.test.ts: the test "shows the received value when a query string cannot match a non-string field" uses this upstream bug as its fixture, so it needs another non-string query field. - Confirm the API reference still documents the
account-infoalternatives (packages/better-auth/tests/openapi-query.test.ts).
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 0
- Merge trung bình
- 2 giờ 45 phút
- Pull request đã merge (30 ngày)
- 64
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rel-kit/relkit
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rel-kit/relkit
Issue tương tự
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving SettingsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ui bug effort:S priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Typo in WSL project description on Projects pageCó thể đã có người làm @akhil9tiet đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
microsoft/opensource.microsoft.com#1066 · 1 bình luận ·
-
ArcGIS Maps SDK for JavaScript c-carousel calcite-design-tokens enhancement impact - p3 - not time sensitive needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Esri/calcite-design-system#15565 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
linkwarden/linkwarden#1891 ·
Maintainer thường phản hồi trong vòng 1 ngày