feat: add Evotor OAuth connection feature with formatted phone input
- Add EvotorConnection model to store user's Evotor access tokens - Implement OAuth 2.0 flow: /evotor (view), /evotor/connect, /evotor/callback, /evotor/disconnect - Add Evotor connection page with connected/disconnected states - Implement phone input masking (+7 (XXX) XXX-XX-XX) using Inputmask - Add Russian validation messages for form fields - Update phone validator to match masked format - Add httpx dependency for async OAuth token exchange - Add Evotor settings to config: CLIENT_ID, CLIENT_SECRET, SCOPES Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,8 @@ from starlette.middleware.sessions import SessionMiddleware
|
||||
|
||||
from web.config import settings
|
||||
from web.database import engine, Base
|
||||
from web.models import User # noqa: F401 — registers model with Base
|
||||
from web.routes import auth, profile, reset
|
||||
from web.models import User, EvotorConnection # noqa: F401 — registers models with Base
|
||||
from web.routes import auth, profile, reset, evotor
|
||||
|
||||
app = FastAPI(title="EvoSync — Личный кабинет")
|
||||
|
||||
@@ -15,6 +15,7 @@ app.mount("/static", StaticFiles(directory="web/static"), name="static")
|
||||
app.include_router(auth.router)
|
||||
app.include_router(profile.router)
|
||||
app.include_router(reset.router)
|
||||
app.include_router(evotor.router)
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
|
||||
Reference in New Issue
Block a user