wake-alarm/phone_app/lib/services
Krzysztof kuhy Rudnicki b9abbf7043 phone_app: use the shared github_device_auth package
The inline `_DeviceCodeDialog` (86 lines) was byte-for-byte identical to
diet-guard's, and `services/github_device_auth.dart` was a fourth copy of
the auth client. Both now come from `github_device_auth` in the
kuhyx/utils monorepo.

This app's client was not merely a drifted copy -- it carried a fix the
other three lacked: `pollForToken` swallowed a transient socket failure and
kept polling, because GitHub can close the connection at the exact moment
the user authorizes. Extracting todo's version would have silently deleted
that. The package took this behaviour instead, so the fix now protects all
four apps rather than just this one.

It is expressed as `on http.ClientException` rather than the local
`SocketException` arm, because the package is also imported by
diet-guard's **web** build where `dart:io` will not compile. Verified that
nothing is lost: package:http wraps a dead socket as
`_ClientSocketException`, which implements both types.

19 tests pass, analyze clean, and the release APK is installed on the
phone and launching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4Rj3s7K2qzrLNgJqqPhno
2026-08-15 16:16:17 +02:00
..
alarm_sync_service.dart Discover alarm device directories instead of reading a fixed phone path 2026-08-09 17:06:43 +02:00
firebase_backend.dart phone_app: add Google sign-in support for the Firebase sync account 2026-08-14 11:26:33 +02:00
google_platform_io.dart phone_app: add Google sign-in support for the Firebase sync account 2026-08-14 11:26:33 +02:00
google_platform_web.dart phone_app: add Google sign-in support for the Firebase sync account 2026-08-14 11:26:33 +02:00
google_platform.dart phone_app: add Google sign-in support for the Firebase sync account 2026-08-14 11:26:33 +02:00
google_sign_in_backend.dart phone_app: add Google sign-in support for the Firebase sync account 2026-08-14 11:26:33 +02:00
sync_settings.dart Migrate phone_app alarm sync from GitHub Gist to crdt_sync 2026-07-11 22:45:14 +02:00