1a195a96bd
- Merge origin/main into branch (resolve conflict in integrations_dashboard.html) - Add defensive JSON parsing with try/except for integration.config - Wrap tester() call in try/except to prevent 500 errors from bad config - Add i18n key integrations.connection_test_failed_fallback in en.json - Reference i18n key in template JS fallback message - Update SECURITY_AUDIT.md: add fix date (2026-03-23), update doc date - Remove accidental revert.sh file - Fix missing MagicMock/patch imports in test file - Add tests for invalid JSON config and tester exception error paths Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/daebb70e-059a-4601-8864-88eef49f99cf
27 lines
609 B
Python
27 lines
609 B
Python
"""View route for the QR code mobile login page.
|
|
|
|
Route:
|
|
GET /qr-login — renders the QR login page (requires login)
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
from fastapi import Request
|
|
|
|
from app.views.base import APIRouter, require_login, templates
|
|
|
|
logger = logging.getLogger(__name__)
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/qr-login", include_in_schema=False)
|
|
@require_login
|
|
async def qr_login_page(request: Request):
|
|
"""Serve the QR code login page for mobile app authentication."""
|
|
return templates.TemplateResponse(
|
|
"qr_login.html",
|
|
{"request": request},
|
|
)
|