feat(auth): support change password

This commit is contained in:
MingxuanGame
2025-10-07 13:07:14 +00:00
parent 95f7c010af
commit 60049a777f
3 changed files with 68 additions and 14 deletions

View File

@@ -10,6 +10,7 @@ from app.auth import (
get_token_by_refresh_token,
get_user_by_authorization_code,
store_token,
validate_password,
validate_username,
)
from app.config import settings
@@ -68,20 +69,6 @@ def validate_email(email: str) -> list[str]:
return errors
def validate_password(password: str) -> list[str]:
"""验证密码"""
errors = []
if not password:
errors.append("Password is required")
return errors
if len(password) < 8:
errors.append("Password must be at least 8 characters long")
return errors
router = APIRouter(tags=["osu! OAuth 认证"])