Commit Graph

55 Commits

Author SHA1 Message Date
f42de3353c Fix iOS time display and add timer unit labels
Times were always showing 0 because ISO8601DateFormatter with default
options does not parse fractional seconds, but Prisma/Node.js serialises
dates as "2026-02-20T09:00:00.000Z" (with .000). Every date(from:) call
silently returned nil, so elapsedTime and duration always fell back to 0.

- Date+Extensions: fromISO8601 now tries .withFractionalSeconds first,
  then falls back to whole seconds — single place to maintain
- OngoingTimer.elapsedTime: use Date.fromISO8601() instead of bare formatter
- TimeEntry.duration: use Date.fromISO8601() instead of bare formatters
- TimerView: add TimerUnitLabels view showing h/min/sec column headers
  under the monospaced clock digits
2026-02-20 14:53:30 +01:00
da0cd302bf Fix OIDC web flow redirect URI not being sent to IDP
The /login route was not passing an explicit redirect_uri to the IDP for
the web flow, so openid-client would silently pick a default which could
resolve to localhost:3001 if OIDC_REDIRECT_URI was not set.

- AuthSession.redirectUri is now required (non-optional)
- createAuthSession() requires a redirectUri; detects native vs web via
  the timetracker:// scheme prefix instead of presence/absence of the arg
- /login route resolves the URI explicitly: request param for native
  flows, config.oidc.redirectUri for web flows
- getAuthorizationUrl() reads redirect_uri from session, no longer
  accepts it as a separate argument
- handleCallback() uses session.redirectUri directly, removing the
  fallback to config.oidc.redirectUri
2026-02-20 14:32:23 +01:00
f758aa2fcd Add iOS redirect URI and JWT secret to Helm chart
Add backend.oidc.iosRedirectUri (default: timetracker://oauth/callback) and
backend.jwt.secret to values.yaml and wire them into the backend deployment
as OIDC_IOS_REDIRECT_URI and JWT_SECRET env vars. Update NOTES.txt to surface
both values post-install.
2026-02-20 11:17:18 +01:00
e51dd58a6b Fix remaining ProjectListResponse reference in TimeEntryFormView 2026-02-19 19:07:36 +01:00
39d6ea00d9 Fix iOS list response decoding to match plain-array backend responses
GET /clients and GET /projects return bare arrays, not wrapped objects.
Remove ClientListResponse and ProjectListResponse wrapper structs and
update ClientsViewModel, ProjectsViewModel, and TimerViewModel to decode
[Client] and [Project] directly.
2026-02-19 19:05:43 +01:00
48cd82ab4f Fix token loss: cache JWT in-memory, log keychain errors
Keychain writes silently failed (missing keychain-access-groups entitlement
on simulator), causing the token to disappear between handleTokenResponse
and the first API call. The in-memory cache ensures the token is always
available within the session; the keychain still persists it across launches
when entitlements allow.
2026-02-19 19:00:16 +01:00
062af3b2da Add AuthManager OSLog tracing and fix URL construction in APIEndpoints 2026-02-19 18:58:31 +01:00
1aac76af4a Add detailed logging to auth flow on backend and iOS 2026-02-19 18:55:00 +01:00
f1f60ef685 Pass OIDC_IOS_REDIRECT_URI and JWT_SECRET to backend container 2026-02-19 18:49:32 +01:00
bb2e51cd0a Add JWT_SECRET and OIDC iOS redirect vars to env template 2026-02-19 18:47:19 +01:00
946cd35832 Replace IDP token passthrough with backend-issued JWT for iOS auth
iOS clients now exchange the OIDC authorization code for a backend-signed
HS256 JWT via POST /auth/token. All subsequent API requests authenticate
using this JWT as a Bearer token, verified locally — no per-request IDP
call is needed. Web frontend session-cookie auth is unchanged.
2026-02-19 18:45:03 +01:00
1ca76b0fec fix 2026-02-18 22:58:41 +01:00
b3db7cbd7b fix 2026-02-18 22:50:37 +01:00
f218552d48 fix 2026-02-18 22:47:44 +01:00
0d084cd546 update 2026-02-18 22:45:38 +01:00
5f23961f50 fix 2026-02-18 22:43:08 +01:00
7e8e220e3b update 2026-02-18 22:37:49 +01:00
ed180500a6 fix 2026-02-18 21:54:21 +01:00
165b1b9c67 fix 2026-02-18 21:53:43 +01:00
2534011506 fix 2026-02-18 21:53:01 +01:00
4c0d8be018 fix 2026-02-18 21:51:43 +01:00
b66b433c08 fix 2026-02-18 21:48:55 +01:00
7659b01614 adds git ignore 2026-02-18 21:45:09 +01:00
4e49741dfa adds ios 2026-02-18 21:35:32 +01:00
4b0cfaa699 increases limit for corrections 2026-02-18 20:32:40 +01:00
51c003cb0d update 2026-02-18 20:18:55 +01:00
859420c5d6 fix 2026-02-18 20:15:11 +01:00
8b45fffd6e update 2026-02-18 20:09:38 +01:00
01502122b2 Revert "update"
This reverts commit 5c86afd640.
2026-02-18 20:05:32 +01:00
6b3d0c342e fix 2026-02-18 19:44:54 +01:00
d2328fc8d6 fix 2026-02-18 19:40:39 +01:00
658a70f3ac fix 2026-02-18 19:31:47 +01:00
c3d1dcab4c update 2026-02-18 19:21:49 +01:00
5c86afd640 update 2026-02-18 19:19:42 +01:00
9b783037ff impoves docker 2026-02-18 19:02:29 +01:00
61545bcf1b update 2026-02-18 18:49:07 +01:00
simon.franken
408f49ba10 update 2026-02-18 16:23:44 +01:00
simon.franken
0f6e55302a update 2026-02-18 16:08:42 +01:00
simon.franken
f5c0a0b2f7 improvements 2026-02-18 15:26:36 +01:00
simon.franken
4cce62934e adds targets 2026-02-18 14:27:44 +01:00
simon.franken
a352318e8a adapts time format 2026-02-18 12:43:17 +01:00
simon.franken
f77e94f7b7 update time visualization 2026-02-18 10:53:15 +01:00
simon.franken
6a6a3ba00b refactoring 2026-02-18 10:26:15 +01:00
27ec450d3b adds helm chart 2026-02-16 23:02:49 +01:00
64fd134044 improvements 2026-02-16 19:54:15 +01:00
81b4a8ead2 small UI fix 2026-02-16 19:36:15 +01:00
c516a097a3 small adaptions 2026-02-16 19:28:23 +01:00
9206453394 adds statistics 2026-02-16 19:15:23 +01:00
2311cd8265 fix 2026-02-16 18:25:09 +01:00
simon.franken
fc06dac40e update 2026-02-16 17:12:47 +01:00