Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,820 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
60/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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"
Lenguaje dominante
TypeScript
Estrellas
2.9k
Forks
157
Merge medio
2 d 46 min
PR fusionados (30 d)
17

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de zenstackhq/zenstack

Todos los issues de zenstackhq/zenstack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.