1
0
forked from firka/firka
Horváth Gergely 7c344be550 Add robust Apple Watch token sync & force-logout
Improve Apple Watch sync resilience and token safety across iOS and Flutter. Key changes:

- Watch (watchOS): rate-limit phone token requests, handle "force_logout" via applicationContext/userInfo and perform local token deletion/cleanup. Added cooldown tracking.
- iPhone host (Swift): expose Flutter methods to check watch app installation, clear iCloud token, and send force-logout to the watch; refuse to forward expired tokens and avoid using iCloud fallback when Flutter reports reauth needed.
- Flutter (WatchSyncHelper/KretaClient): cache and check whether a paired Watch app is installed before touching iCloud/watch; reject expired access tokens (both incoming and outgoing) and prevent sending expired tokens to watch; added fresh-install cleanup to clear iCloud/local state once per install; added methods to notify watch of forced logout and to clear iCloud token.
- Initialization: run fresh-install cleanup before attempting iCloud recovery and skip recovery if cleanup ran.
- Login/settings/home UI: only attempt watch sync when a watch is installed; clear iCloud token on account removal (iOS); minor UX/timing and formatting cleanups.

These changes prevent propagation of expired tokens, reduce redundant phone/watch messaging, and provide a controlled force-logout flow for account removal or fresh installs.
2026-02-27 23:23:56 +01:00
2025-09-15 12:21:40 +02:00
2025-02-10 22:22:45 +01:00
2025-10-12 15:50:53 +02:00
2025-02-10 22:22:45 +01:00
2025-09-08 20:50:41 +02:00
2025-10-26 09:14:10 +01:00
2025-08-24 16:57:08 +02:00
2025-02-10 22:22:45 +01:00
2025-02-10 22:22:45 +01:00

Firka

HU Magyar EN English

Crowdin

The project

Firka is an alternative client for [an application to be named]. The app's goal is to be a modern user friendly app for the [to be named] system.

Contribution guide

Description
No description provided
Readme 58 MiB
Languages
Dart 61.7%
Swift 34.6%
Kotlin 3.1%
Shell 0.4%