`consumeOne` method not implemented — password reset broken with `better-auth >=1.7.0`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 60/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, typescript
- Lĩnh vực
- authentication
Hướng nghiên cứu
Start in the @zenstackhq/better-auth adapter package and read the existing adapter methods (findOne, delete/consume on the verification table) to see the conventions for token records. Then check the better-auth 1.7 adapter contract for consumeOne's exact signature and return shape before implementing an atomic find-and-delete. Done means a password reset completes on better-auth 1.7.x with an unmodified caller, and the peerDependencies range in the adapter package reflects the supported version. A test exercising sendResetPassword end to end is the way to confirm it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The zenstackAdapter does not implement the consumeOne method, which became required in [email protected]. This causes a BetterAuthError when users attempt to reset their password.
Error
BetterAuthError: Adapter "zenstack" must implement consumeOne for atomic single-use credential consumption.
at factory.mjs:699:68
Steps to Reproduce
- Set up a project with
better-auth@^1.6.26(resolves to1.7.x) and@zenstackhq/[email protected] - Configure email/password with
sendResetPassword - Request a password reset email
- Click the reset link and submit the new password
- The error above is thrown
Expected Behavior
Password reset completes successfully. The consumeOne method should atomically find and delete the single-use token from the verification table.
Environment
@zenstackhq/better-auth:3.9.2better-auth:1.7.1- Provider: PostgreSQL
Notes
[email protected]introducedconsumeOneas a required adapter method for atomic single-use credential consumption (used for password reset tokens and potentially email verification tokens).- The
peerDependenciesallowbetter-auth: "^1.3.0", but the adapter does not work with1.7.x. - As a workaround, I've pinned
better-authto~1.6.26to avoid the breaking change. - This likely affects all versions of
@zenstackhq/better-auth.
Workaround
Pin better-auth to ~1.6.26 in your package.json:
"better-auth": "~1.6.26"
- Ngôn ngữ chính
- TypeScript
- Star
- 2.9k
- Fork
- 157
- Merge trung bình
- 2 ngày 46 phút
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 zenstackhq/zenstack
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
zenstackhq/zenstack#2873 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`@default` on a field of a `@map`-ed enum emits the enum name as the column defaultCó thể đã có người làm @jkugsiya đã nhận 5 ngày trước. Đang mởruntime
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zenstackhq/zenstack#2868 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
zenstackhq/zenstack#2694 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
zenstackhq/zenstack#2659 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
zenstackhq/zenstack#2542 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của zenstackhq/zenstack
Issue tương tự
-
The inspector never shows the instances field, so scaling out is unreachableCó thể đã có người làm @Mrkewl đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
xevrion/breakscale#96 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Object parameters lose their structure when resources is enabledCó thể đã có người làm @asts-top đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rossant/awesome-math#199 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jaegertracing/jaeger-ui#4618 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
mifi/lossless-cut#3125 ·
Maintainer thường phản hồi trong vòng 1 ngày