**Motivations:** - Migrer api-relay vers base de données SQLite (production) - Ajouter authentification API key pour endpoints POST (protection abus) - PersistentNonceCache pour service-login-verify (IndexedDB/localStorage) - Écran paramètres crypto avancés UserWallet - Documenter options non implémentées (Merkle, évolutions api-relay) **Root causes:** - N/A (évolutions + correctifs) **Correctifs:** - N/A **Evolutions:** - api-relay: DatabaseStorageService (SQLite), StorageAdapter (compatibilité), ApiKeyService (génération/validation), auth middleware (Bearer/X-API-Key), endpoints admin (/admin/api-keys), migration script (migrate-to-db.ts), suppression saveToDisk périodique - service-login-verify: PersistentNonceCache (IndexedDB avec fallback localStorage, TTL, cleanup), export dans index - userwallet: CryptoSettingsScreen (hashAlgorithm, jsonCanonizationStrict, ecdhCurve, nonceTtlMs, timestampWindowMs), modifications LoginScreen, LoginForm, CreateIdentityScreen, ImportIdentityScreen, DataExportImportScreen, PairingDisplayScreen, RelaySettingsScreen, ServiceListScreen, MemberSelectionScreen, GlobalActionBar - features: OPTIONS_NON_IMPLENTEES.md (analyse Merkle trees, évolutions api-relay) **Pages affectées:** - api-relay: package.json, index.ts, middleware/auth.ts, services/database.ts, services/storageAdapter.ts, services/apiKeyService.ts, scripts/migrate-to-db.ts - service-login-verify: persistentNonceCache.ts, index.ts, tsconfig.json, dist/ - userwallet: App, CryptoSettingsScreen, LoginScreen, LoginForm, CreateIdentityScreen, ImportIdentityScreen, DataExportImportScreen, PairingDisplayScreen, RelaySettingsScreen, ServiceListScreen, MemberSelectionScreen, GlobalActionBar - features: OPTIONS_NON_IMPLENTEES.md - data: sync-utxos.log
UserWallet Login
Site de login avec authentification secp256k1, conçu pour être utilisé en iframe par Channel Messages.
Fonctionnalités
- Authentification basée sur des clés secp256k1
- Communication avec le parent via
postMessage - Gestion de l'activation/désactivation du login par service
- Interface responsive et accessible
Installation
npm install
Développement
npm run dev
Le site sera accessible sur http://localhost:3018
Build
npm run build
Architecture
- Authentification : Génération de paires de clés secp256k1, signature de challenges
- Communication iframe : Messages
postMessagepour l'intégration - Stockage : LocalStorage pour les clés et la configuration des services
- Interface : React + TypeScript avec accessibilité (ARIA)
Types de messages iframe
auth-request: Demande d'authentification depuis le parentauth-response: Réponse avec signatureservice-toggle: Activation/désactivation d'un serviceservice-status: Envoi du statut des services