Skip to content

feat(scripts): add an operator password check/reset command - #163

Merged
KenTaniguchi-R merged 1 commit into
mainfrom
feat/reset-password-script
Sep 7, 2026
Merged

feat(scripts): add an operator password check/reset command#163
KenTaniguchi-R merged 1 commit into
mainfrom
feat/reset-password-script

Conversation

@KenTaniguchi-R

Copy link
Copy Markdown
Owner

A self-hosted instance with no outbound mail configured has no way to drive Better Auth's email reset flow, so an operator who forgets their password is locked out of their own instance with no route back in.

pnpm reset-password --check|--set <email> goes at the credential directly through Better Auth's internal adapter, so the hash and the minimum-length rule stay the ones the app itself enforces rather than a second implementation that could drift.

The password is read from a muted stdin prompt rather than argv, keeping it out of shell history and out of the process table.

Testing

pnpm typecheck and pnpm lint pass. The script is an operator entry point with no callers in app code.

🤖 Generated with Claude Code

Self-hosted instances with no outbound mail have no way to drive Better
Auth's email reset flow, which leaves a locked-out operator with no route
back into their own instance.

`pnpm reset-password --check|--set <email>` goes at the credential
directly through Better Auth's internal adapter, so the hash and the
minimum-length rule stay the ones the app itself enforces. The password
is read from a muted prompt rather than argv, keeping it out of shell
history and the process table.
@KenTaniguchi-R
KenTaniguchi-R merged commit be2e1b8 into main Sep 7, 2026
5 checks passed
@KenTaniguchi-R
KenTaniguchi-R deleted the feat/reset-password-script branch September 7, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant