Move app/auth.py to app/auth/__init__.py and add thematic submodule files: - app/auth/jwt.py - JWT encode/decode helpers - app/auth/passwords.py - bcrypt hash/verify - app/auth/totp.py - 2FA TOTP helpers - app/auth/store.py - user storage (_get_user, _save_user, etc.) - app/auth/schemas.py - Pydantic models - app/auth/deps.py - FastAPI dependencies (get_current_user, etc.) - app/auth/oauth.py - Google/GitHub/X/Telegram OAuth flows - app/auth/wallet.py - wallet signature auth (migrated from auth_wallet.py) The legacy app/auth.py and app/auth_wallet.py become re-export shims. Public API fully preserved across all 18+ importers. Routes unchanged (56). Phase 3B of AUDIT-2026-Q3.md.
15 lines
309 B
Python
15 lines
309 B
Python
"""User storage helpers - re-exports from app.auth.
|
|
|
|
Phase 3B of AUDIT-2026-Q3.md.
|
|
|
|
Public API:
|
|
- _get_user, _get_user_by_email, _save_user, _delete_user
|
|
- _is_valid_email
|
|
"""
|
|
from app.auth import ( # noqa: F401
|
|
_delete_user,
|
|
_get_user,
|
|
_get_user_by_email,
|
|
_is_valid_email,
|
|
_save_user,
|
|
)
|