Post #3794815
2026-02-08 09:18 UTC
Torn between going with Sign in with Apple, or chasing a secure no-signup way to associate push tokens with a user’s devices using CloudKit
(a la https://www.swiftjectivec.com/how-to-use-icloud-without-really-using-icloud/).
Part of me really doesn’t want any kind of account in the app, even if it’s optional or delayed. But I also want something that’s secure and maintainable… which is exactly what Sign in with Apple promises to be.
Trade-offs everywhere. Curious how others have approached this.
Replies (1)
-
@simonbs@mastodon.social 2026-02-08 11:38
A “no account” solution based on CloudKit could look like this: 1. Device fetches S, a user-specific secret, from the user’s private CloudKit DB, creating it if missing. 2. Device authenticates with HMAC_SHA256(S, token || deviceId || timestamp || nonce) 3. On first registration, the backend learns S and then groups devices by userId = SHA256(S), verifying the HMAC and rejecting replays via timestamp and nonce. This proves knowledge of S, and therefore access to the user’s private CloudKit DB.