feat(auth): support change password
This commit is contained in:
@@ -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 认证"])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user