2026.11.27-1 · Native Client Login Resumption & Local Unlock
Release Tag:
2026.11.27-1(Released · 2026-11-27) Platforms Covered: Go Server · Apple (macOS / iOS) · Android · Windows Summary: Cold-launch login resumption backed by OS per-use local authentication and V5 device signatures while keeping business Bearer tokens strictly in RAM.
iOS, macOS, Android, and Windows now share a unified device-bound login resumption protocol. After initial Passkey login and device activation, the server-issued expires_at acts as the single shared deadline for both active sessions and offline-to-online relaunch resumption—defined as the earlier of 20 hours after issuance or the device leaf certificate's NotAfter. Locking, app restart, and repeated resumptions all inherit this exact deadline (for example, relaunching 19 hours 59 minutes after sign-in still permits local unlock if the certificate remains valid, leaving ~1 minute before Passkey re-authentication is required). Credential Issuance Source
1. Design Rationale & User Experience
Previously, native clients stored business Bearer credentials exclusively in process memory: if the OS reclaimed a backgrounded app, or the user swiped the app from Recents / closed the window, reopening Chirp always required another browser or phone QR Passkey ceremony. Creating a separate extended lifetime solely for cold relaunch would also cause inconsistent access outcomes for the same account depending on whether the OS killed the process.
The new design preserves RAM-only Bearer tokens and the shared 20-hour ceiling, delegating cold-launch resumption to OS-gated secure storage paired with a fresh server challenge-response proof:
| Scenario | User Experience & Outcome |
|---|---|
| First sign-in / credential expired | Authenticates via Passkey and device binding to start a fresh session generation. |
| App switch or screen lock (process alive) | No extra prompt: continues using the in-memory session and active call while checking the deadline and receiving server state streams. |
| Swiped from Recents, closed, or OS-reclaimed | On the first foreground entry of the new process, a valid sealed record triggers local OS verification (Face ID / Touch ID / strong biometrics / Windows Hello). Once unlocked, the client signs a server challenge with the device key to obtain a fresh Bearer (re-entering a voice room still requires normal room join & keying). |
| Server issued no resumption grant or OS lacks secure storage | The current process works normally; after termination, Passkey login is required. Once conditions are met, one Passkey sign-in enables cold-launch resumption. |
| User cancels local unlock or is temporarily offline | Remains on the lock screen; the user can retry within the original deadline or fall back to Passkey sign-in anytime. |
| Explicit sign-out | Immediately wipes local resumption material and revokes any live Bearer on the server; next launch requires Passkey. |
| Takeover by another device, disabled account, or revoked device | The server rejects resumption during challenge/completion; clients wipe the local record upon receiving deterministic invalidation errors. |
2. Server Endpoints, Storage & Signature Mechanics
Server API & Transaction Flow
All three endpoints accept JSON POST requests against the verified passkey_origin alongside X-Chirp-Platform (ios, macos, android, windows), X-Chirp-Version, and X-Chirp-Build headers. Note that the API origin and passkey_origin may differ in some deployments. HTTP Handlers · Client Header Validation
| Endpoint | Request & Capability | Response & Server Semantics |
|---|---|---|
POST /api/client/identity/complete | Standard Passkey + PKCE activation payload; resumption-capable clients send header X-Chirp-Login-Resumption: 1 | Returns credential, expires_at, member, participant_identity, device_identity, plus resume_token when enabled. If absent (legacy server), the active in-memory login still succeeds. |
POST /api/client/resume/challenge | {"resume_token":"<token>"} | Returns {"challenge":"<nonce>"} valid for up to 1 minute (capped by expires_at). Unconsumed challenges may be re-fetched while still valid. |
POST /api/client/resume/complete | {"resume_token":"<token>","signature":"<b64>"} | Returns the same login generation, original expires_at, and a fresh credential. Clients verify member, participant, and full device identity before unlocking. The previous Bearer is immediately invalidated while resume_token stays usable until expires_at. |
- In-place schema compatibility: Adds the
client_login_resumptionstable (member_idPK with cascading delete, unique 32-bytetoken_hash,login_id,origin,platform,challenge,challenge_expires_at) viaCREATE TABLE IF NOT EXISTSbefore fresh-database-only tables—keeping SQLite Schema23so existing deployments upgrade seamlessly without manual migrations. Schema SQL - Atomic write transaction & replay guard: Lookups index by the SHA-256 digest of
resume_tokenand match platform, canonicalorigin, member ID, and activelogin_id. Both challenge and completion verify deadline, client version policy, account status, device cert chain, and blacklists. Completion consumes the challenge and rotates the Bearer digest inside one SQLite write transaction, preservinglogin_idand room join sequence; concurrent proofs yield at most one winner, and lost responses can safely request a new challenge. Resumption Store
Canonical Message Format & Test Vectors
Resumption proofs use domain label Chirp login resumption v1 signed by the V5 device's Ed25519 leaf private key over 7 length-prefixed fields (each prefixed by a 4-byte big-endian unsigned UTF-8 byte length). Signatures are transmitted as padded standard Base64. Protocol Bytes · Activation & Resumption Messages
| Order | Field Content |
|---|---|
| 1 | Literal Chirp login resumption v1 |
| 2 | Normalized identity service origin with scheme, canonical host, and explicit port (e.g. https://keys.example.test:443) |
| 3 | Request platform (ios, macos, android, or windows) |
| 4 | Full participant_identity from initial sign-in (member_id.login_id) |
| 5 | Standard Base64 of SHA-256 over the full UTF-8 resume_token bytes (including token prefix) |
| 6 | Raw challenge string returned by server (32 random bytes encoded as unpadded Base64URL) |
| 7 | Standard Base64 of V5 Device.Hash(), covering the entire certificate chain |
Cross-platform test vector (using the repo V5 fixture device, origin above, platform android, and member_fixture.login_fixture): V5 Device Fixture · Go Vector Tests
resume_token resume-v1_AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8
challenge ICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj8
device_digest B2OupV0g1omfnvJm4I8JfohQCvn7yAv+8P/cfItvL4E=
token_sha256_b64 bFSEn41asLYKn+esux2icvSTGymvnfv4xXqjZU5Nhe0=
message_sha256_b64 nOrZz5uNpOPV7sgnW/wGZ26KFdcd0z3Z4+6I2reXpr8=New clients use versioned resume-v1_ tokens. Both the server and Apple clients retain transitional support for earlier resume_ handles (preserving non-expired entries while invalidating pending challenges).
3. Security Impact & Boundaries
While cold-launch resumption adds a persisted resume_token secret on device, business Bearer tokens remain strictly in RAM:
- Cloning & replay resistance: Copying
resume_token, copying normal preferences, or replaying a captured signature cannot authorize another machine—the server requires a fresh Ed25519 signature from the enrolled device over a single-use challenge, and enforces sign-out, takeover, revocation, and the 20-hour deadline at resumption time. Server Resumption Tests - OS-enforced user presence: Biometric/PIN verification runs locally inside the OS; the server never receives biometric data or passwords. Every platform ties unsealing of the resumption secret directly to per-use OS authentication (
LAContext/BiometricPrompt.CryptoObject/ Microsoft PassportNCryptDecrypt), leaving only non-secret lock-screen hints in ordinary storage. - Foreground switching: Routine app switching relies on the device's own screen lock; running sessions stay intact while server revocation sweeps, original expiry timers, and recent-tasks preview redaction continue to apply.
4. Per-Platform Implementation Details
Apple (macOS & iOS)
- Per-authentication Keychain: Stores resumption secrets in the Data Protection Keychain (
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, sync disabled). iOS binds reads withbiometryCurrentSet(Face ID / Touch ID enrollment changes invalidate access); macOS usesuserPresence(Touch ID or login password). Each cold launch uses a freshLAContext. SavedLogin.swift - Atomic pointer & lifecycle: Atomically writes a random Keychain item identifier and expiry hint to a backup-excluded app directory before completing sign-in so immediate force-quits still retain the pointer (while reading legacy preference indexes).
ChirpApp.swiftandLoginSession.swifttrigger automatic unlock only when a fresh process first becomes foreground-ready; cancellations or background interruptions hold the lock screen (LoginLockView.swift) for manual retry without disrupting already-unlocked sessions. ChirpApp.swift · LoginSession.swift · LoginLockView.swift
Android
- Android Keystore +
CryptoObject: On activation, encrypts the resumption record with a random AES-GCM key, wraps that key with an Android Keystore RSA public key, and atomically writes the payload tonoBackupFilesDir/login-resumption-v1. Unlocking binds RSA unwrapping toBiometricPrompt.CryptoObject(BIOMETRIC_STRONG); biometric enrollment changes permanently invalidate the Keystore key. BiometricLoginVault.kt · LoginResumption.kt - Task teardown & preview privacy: Swiping Chirp from Recents still ends calls and drops the RAM Bearer cleanly; relaunching shows
LockedLoginScreenand invokes biometric unlock once.TaskPreview.ktredacts account screens and sensitive dialogs in the Recents switcher. ChirpApplication.kt · TaskPreview.kt
Windows
- Opt-in Windows Hello & two-layer sealing: Initial sign-in still opens Passkey directly, allowing users to opt in to Windows Hello inside Settings afterward. Capable clients request
resume_tokenon activation and hold it in engine RAM until enrollment. WinUI creates a per-use Microsoft Passport KSP RSA decryption key, re-opens it to verify protection policy, and invokesNCryptDecryptwith real ciphertext/output buffers—writing sealed AES-256-GCM records to disk only after silent decryption is explicitly denied (already-enrolled PCs silently read the public key on future logins). WindowsHelloLoginKey.cs · resumption_windows.go - Shared multi-window lock & static previews: All windows share
LoginLock. The first foreground window triggers Windows Hello once after network clock validation; canceling, minimizing, switching apps, or locking the screen interrupts in-flight unlocks while keeping manual retry ready. Taskbar and Alt-Tab previews stay static. Closing windows retains valid resumption records, whereas clicking Sign Out wipes local storage and revokes the session on the server. LoginResumption.cs · MainWindow.xaml.cs
Shared Error Codes, Diagnostic Events & Bundled Improvements
- Error codes:
ClientError.swiftand bilingualErrors.stringsaddCLIENT_LOCAL_UNLOCK_FAILEDandRESUMPTION_PROOF_INVALID. Serverserver.gomapsstore.ErrResumptionProofto HTTP409 RESUMPTION_PROOF_INVALID(retryable with a new challenge), whereas deterministic invalidation errors (INVALID_AUTHORIZATION,MEMBER_DISABLED,IDENTITY_BLACKLISTED) clear the local record and return to sign-in. Windows additionally distinguishes local storage/key availability (LOGIN_STORAGE_UNAVAILABLE,HELLO_KEY_UNAVAILABLE). .chirplogdiagnostics: Enabled logs recordloginWithoutResumptionGrantandsaveLoginForRelaunchin theaccounttable (plusresumeLoginandunlockLoginon Windows) to diagnose missing grants or storage errors without exposing secrets.- Bundled UI & repo links: Added direct GitHub repository links in Apple Settings/About, Android About Chirp, Windows General Settings, and web portals (
/register,/device,/admin/), along with updated GitHub social preview branding.
5. Verification & Release Readiness
| Component | Verification Summary |
|---|---|
| Go Server | Shared issuance, challenge, and atomic resumption implemented across all four platforms; HTTP tests cover active resumption, Bearer rotation, old Bearer invalidation, and legacy clients without capability headers. Full Go -race suite passed. Server Tests |
| Apple (macOS / iOS) | 2026.11.27 (build 1) Release builds and strict codesigning verified (installed and checked on iPhone 17 Pro Max). All 312 Swift tests passed covering cold launch, background return, 20-hour boundary, cancellations, server revocations, and late responses. ClientLoginTests.swift |
| Android | 2026.11.27 (build 1) Release build and APK signature verified; tested on Android 17 emulator against live Go server covering swipe-from-Recents unlock, offline/cancel retry, screen-lock preservation, biometric re-enrollment invalidation, explicit sign-out, Recents preview redaction, and late-response protection. BiometricLoginTest.kt |
| Windows | 2026.11.27 (build 1; iterative verification through build 2) verified on Windows 11 (OS Build 26300) with two consecutive interactive Windows Hello unseals and silent-read denial before/after each; tested opt-in enrollment, auto-unlock on relaunch, and silent public-key reuse after sign-out; Go engine & desktop tests passed. resumption_windows_test.go · LoginResumptionChecks.cs |
Rollout & Final Device QA Notes
- Deployment order: Upgrade the Go server first (auto-creates
client_login_resumptionson schema23). Users then complete one Passkey login on capable clients to storeresume_token. - Pre-release physical QA: Using the Manual QA Checklist as baseline, verify on real devices the 1s-before-expiry vs. exact-expiry transitions, device certs expiring earlier than 20h, cross-device token copy rejection, background interruption mid-unlock, and background call continuity.
