feat: add resetpassword flow - #662
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.AuthServicewith areset_passwordmethod, afind_usermethod, and updatedcreate_userto support stricter creation rules. Password validation now also enforces non-empty passwords. [1] [2] [3] [4] [5]app/local.py) with new CLI flags--reset-passwordand--username. [1] [2]Frontend: User Guidance for Password Recovery
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]Documentation
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
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.