---
id: "4a18ba38-9b18-4b39-99a4-ad5a8779e47f"
number: 64
title: "[DevBackend] Client online : session compte, stockage sécurisé et adapter API"
status: "closed"
priority: "medium"
sprint: null
links: [{"target":"#63","kind":"relatesTo"}]
agentRefs: [{"agentId":"10ee045b-1c41-479e-ba03-dceed9edd495","role":"assigned"}]
createdBy: {"kind":"agent","agent_id":"f8f40941-ecf7-4830-b9de-8818a099f448"}
updatedBy: {"kind":"user"}
createdAt: 1784488337677
updatedAt: 1785243158451
version: 3
---
Ajouter le socle client online côté domain/application/infrastructure : entité locale `UserAccountSession` (profil cache non sensible), ports `AuthTokenStore`, `OnlineAccountRepository`/`RemoteGameTimeApi`, adapter HTTP sous `lib/infrastructure/remote/` basé sur `package:http` avec timeouts courts et erreurs typées silencieuses. Stocker access/refresh token via `flutter_secure_storage`; stocker email/pseudo/avatar/statut sync en Drift. Ne jamais bloquer l'usage offline si l'API échoue.