Skip to content

feat: add resetpassword flow - #662

Merged
arabcoders merged 2 commits into
masterfrom
dev
Aug 18, 2026
Merged

arabcoders merged 2 commits into
masterfrom
dev

Conversation

@arabcoders

Copy link
Copy Markdown
Owner

This pull request introduces a secure password reset mechanism for YTPTube, including a new CLI tool for administrators to reset user passwords, backend API and service changes to support password resets, and frontend enhancements to guide users on password recovery. It also adds comprehensive tests for the reset functionality and updates documentation and translations accordingly.

Backend: Password Reset Feature

  • Added a new script (app/scripts/reset_password.py) that allows administrators to reset a user's password from the command line. The script verifies the account exists, securely prompts for a new password (with confirmation), updates the database, and invalidates all user sessions.
  • Extended the AuthService with a reset_password method, a find_user method, and updated create_user to support stricter creation rules. Password validation now also enforces non-empty passwords. [1] [2] [3] [4] [5]
  • Integrated password reset support into the native server entrypoint (app/local.py) with new CLI flags --reset-password and --username. [1] [2]

Frontend: User Guidance for Password Recovery

  • Updated the login page (ui/app/pages/login.vue) to include a "Forgot password?" link, which opens a modal explaining that password recovery requires local access and links to the FAQ instructions. [1] [2]
  • Added translations for the new password recovery UI in all supported languages. [1] [2] [3] [4] [5]

Documentation

  • Expanded the FAQ (FAQ.md) with a section detailing how to reset a forgotten password using the new CLI tool, including instructions for Docker, Podman, and native environments.

Testing

  • Added extensive tests for password reset scenarios, including CLI input validation, error handling, and session invalidation after a reset, ensuring robust coverage of the new functionality. [1] [2] [3] [4] [5]

These changes collectively improve YTPTube's security and user support by providing a safe, auditable way for administrators to recover accounts and by making recovery instructions accessible to users.

@arabcoders
arabcoders merged commit caf01f0 into master Aug 18, 2026
13 checks passed
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