- Reorganized `auth-feature` into `core/auth` to improve architecture and modularity. - Removed unused PKCE and OAuth callback utilities (`AuthCallbackParams`, `OAuthPkceService`). - Updated imports and adjusted build scripts to reflect new module structure. - Refactored `LoginScreen` and `PingScreen` to include `onBack` functionality in top bars for improved navigation. - Corrected sync endpoint in `PingSyncService`.
2.2 KiB
2.2 KiB
| type | status | owner | date | participants | ||
|---|---|---|---|---|---|---|
| Journal | COMPLETED | Frontend Expert | 2026-01-22 |
|
Session Log: Frontend Auth & Refactoring
Datum: 22. Jänner 2026 Ziel: Implementierung des Login-Flows im Frontend und Refactoring der Architektur.
Durchgeführte Arbeiten
1. Architektur-Refactoring
- Auth-Feature: Das Modul
frontend/features/auth-featurewurde nachfrontend/core/authverschoben, da es sich um eine Basisfunktionalität (Infrastruktur) handelt. - Design-System: Das Package
at.mocode.clients.shared.commonuiwurde zuat.mocode.frontend.core.designsystemrefactored. - Cleanup: Alte, redundante Dateien und Module wurden bereinigt.
2. Authentifizierung (Login)
- Client: Umstellung auf
postman-client(Confidential Client) für den Desktop-Login, daweb-app(Public Client) keine Direct Access Grants (Password Flow) unterstützte. - Secret: Das Client Secret (
postman-secret-123) wurde temporär inAppConstantshinterlegt (DEV-Only). - AuthApiClient: Implementierung von Basic Auth Header für den Token-Request.
- LoginViewModel: Fix des State-Managements beim Logout (automatischer Reset von
isAuthenticated).
3. UI & Navigation
- MainApp: Einführung von
AppScaffoldund Scroll-Support für Landing/Welcome Screens. - Navigation: Hinzufügen von "Zurück"-Buttons in
LoginScreenundPingScreen. - Usability: Entfernung verwirrender Browser-Login-Buttons.
4. Backend-Integration
- Secure Ping: Erfolgreich getestet (200 OK mit Token).
- Sync: Erfolgreich getestet (200 OK mit Token). URL-Fix (
/api/pings/sync->/api/ping/sync).
Ergebnisse
- Die Desktop-App ist nun voll funktionsfähig: Login, Logout, Secure API Calls und Sync funktionieren.
- Die Code-Struktur ist sauberer und folgt der Trennung zwischen Core (Infra) und Features (Domain).
Offene Punkte
- Browser-Login: PKCE Flow für Web-Target muss noch sauber implementiert werden.
- User-Info: Das Profil zeigt noch "unbekannt", da der Username nicht korrekt aus dem Token geparst wird.
- Secret Management: Das Client Secret darf nicht im Code bleiben (für Prod).
Status: ✅ Erfolgreich abgeschlossen.