Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`consumeOne` method not implemented — password reset broken with `better-auth >=1.7.0`

オープン
#2,820 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
60/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

  1. Set up a project with better-auth@^1.6.26 (resolves to 1.7.x) and @zenstackhq/[email protected]
  2. Configure email/password with sendResetPassword
  3. Request a password reset email
  4. Click the reset link and submit the new password
  5. 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.2
  • better-auth: 1.7.1
  • Provider: PostgreSQL

Notes

  • [email protected] introduced consumeOne as a required adapter method for atomic single-use credential consumption (used for password reset tokens and potentially email verification tokens).
  • The peerDependencies allow better-auth: "^1.3.0", but the adapter does not work with 1.7.x.
  • As a workaround, I've pinned better-auth to ~1.6.26 to 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"
主要言語
TypeScript
スター
2.9k
フォーク
157
平均マージ
2日 46分
マージ済み PR(30日)
17

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zenstackhq/zenstack のほかの issue

zenstackhq/zenstack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。