Skip to content

auth-method-matrix: change-email and delete-user are booked as mounted in auth-route-ledger.ts but plugin-auth never configures better-auth's user.changeEmail / user.deleteUser — no switch to enable them #7735

Description

@huangyiirene

Symptom

Two core-auth routes are advertised as mounted but are dead:

  • POST /api/v1/auth/change-email answers 400 CHANGE_EMAIL_DISABLED.
  • POST /api/v1/auth/delete-user answers 404.

Both are booked in the route ledger (packages/plugins/plugin-auth/src/auth-route-ledger.ts): line 118 { route: 'POST /api/v1/auth/change-email', … client: 'auth.changeEmail' } and line 120 { route: 'POST /api/v1/auth/delete-user', … client: 'auth.deleteUser' } — yet neither can be enabled through any product switch.

Root cause

plugin-authnever configures better-auth's user.changeEmail / user.deleteUser options. On origin/main, changeEmail/deleteUser appear only inside auth-route-ledger.ts (the two ledger rows at 118/120, plus the disabled-route list at 247/249 and a /delete-user/callback entry at 196) — zero configuration hits anywhere else in plugin-auth/src (or dist). Because better-auth ships these features off by default and nothing turns them on, the routes are mounted-but-disabled with no lever to flip.

The fix is either to configure better-auth's user.changeEmail / user.deleteUser (with whatever verification/confirmation policy the platform wants) so the ledgered routes actually work, or to stop booking them as mounted until they are wired.

Reproduction

  1. Boot the app; inspect auth-route-ledger.ts — both routes are booked mounted.
  2. POST /api/v1/auth/change-email {newEmail} → 400 CHANGE_EMAIL_DISABLED.
  3. POST /api/v1/auth/delete-user → 404.
  4. Grep plugin-auth/src (and dist) for changeEmail / deleteUser → the only hits are in auth-route-ledger.ts; no better-auth user.* configuration enables them.

Source

Extracted from the QA run #7663 (framework 92f26f7, console 09987b680).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions