[PR #178] [MERGED] Add admin CLI password reset command #168

Closed
opened 2026-02-27 15:55:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/178
Author: @arunavo4
Created: 2/24/2026
Status: Merged
Merged: 2/24/2026
Merged by: @arunavo4

Base: mainHead: codex/issue-172


📝 Commits (1)

  • d023b25 Add admin CLI password reset flow

📊 Changes

3 files changed (+109 additions, -4 deletions)

View changed files

📝 README.md (+14 -0)
📝 package.json (+1 -0)
📝 scripts/manage-db.ts (+94 -4)

📄 Description

Summary

  • add a non-destructive reset-password command to scripts/manage-db.ts
  • hash with Better Auth's own crypto helper and upsert credential account if missing
  • invalidate existing sessions for the user after reset
  • document CLI recovery flow in README and add bun run reset-password script

Why

Fixes the admin lockout recovery gap raised in #172 and complements #164 without requiring email provider setup.

Test

  • bun test

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/178 **Author:** [@arunavo4](https://github.com/arunavo4) **Created:** 2/24/2026 **Status:** ✅ Merged **Merged:** 2/24/2026 **Merged by:** [@arunavo4](https://github.com/arunavo4) **Base:** `main` ← **Head:** `codex/issue-172` --- ### 📝 Commits (1) - [`d023b25`](https://github.com/RayLabsHQ/gitea-mirror/commit/d023b255a75dbaec8f360bf97901251b8e5872a0) Add admin CLI password reset flow ### 📊 Changes **3 files changed** (+109 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+14 -0) 📝 `package.json` (+1 -0) 📝 `scripts/manage-db.ts` (+94 -4) </details> ### 📄 Description ## Summary - add a non-destructive `reset-password` command to `scripts/manage-db.ts` - hash with Better Auth's own crypto helper and upsert credential account if missing - invalidate existing sessions for the user after reset - document CLI recovery flow in README and add `bun run reset-password` script ## Why Fixes the admin lockout recovery gap raised in #172 and complements #164 without requiring email provider setup. ## Test - bun test --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem closed this issue 2026-02-27 15:55:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gitea-mirror#168
No description provided.