fix(redis): gepoolten async-Redis-Client statt Connect/Close pro Request
Security Audit / Python Dependency Audit (push) Canceled after 0s
Security Audit / Node.js Dependency Audit (push) Canceled after 0s

TOTP-Login und Kiosk-Nonce-Check öffneten/schlossen bisher pro Request eine
neue aioredis-Verbindung. Neuer get_async_redis()-Pool in core/redis.py wird
von beiden Stellen genutzt, sauberer Shutdown im FastAPI-Lifespan.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Ahyx6D3r7G1EuAc42nezn
This commit is contained in:
2026-09-02 22:29:08 +02:00
co-authored by Claude Sonnet 5
parent 52ecd9e5ce
commit c733ddfe40
5 changed files with 50 additions and 21 deletions
+6
View File
@@ -1,5 +1,11 @@
const BASE_URL = '/api/v1'
// ADR: Access-Token bewusst in localStorage (nicht in-memory), Tradeoff akzeptiert.
// Grund: 30min-Lifetime begrenzt XSS-Fenster; Refresh-Token liegt bereits als
// HttpOnly-Cookie (siehe M-2 unten). Voller HttpOnly-Umbau des Access-Tokens
// wäre größerer Architektur-Eingriff (Backend müsste jede Response als Cookie
// setzen) noch nicht umgesetzt, siehe Security-Review 2026-09.
// Läuft ein Refresh bereits? Damit parallele Requests nicht mehrfach refreshen
let _refreshing: Promise<string | null> | null = null