Skip to content

fix: await startup token refresh for late iOS prefetches - #223

Open
OskarEichler wants to merge 1 commit into
margelo:mainfrom
OskarEichler:codex/nitro-ios-late-prefetch-refresh
Open

fix: await startup token refresh for late iOS prefetches#223
OskarEichler wants to merge 1 commit into
margelo:mainfrom
OskarEichler:codex/nitro-ios-late-prefetch-refresh

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 27, 2026

Copy link
Copy Markdown

Fixes

Late iOS registrations share the existing startup token-refresh task rather than sending immediately with old cached credentials. They honor success, stored-token fallback, and skip. This keeps network work asynchronous and adds no refresh requests.

Compatibility / breaking changes

Late requests now wait for the in-flight refresh; onFailure=skip suppresses them when refresh fails. Previously they could already have been sent. Registrations when startup has no refresh task retain cached-token fallback. No public API or persisted schema changes.

Verification

Three gated Swift reproductions execute the actual registration/startup methods: success, skip, and stored-token fallback all fail on baseline and pass after the fix. Synthetic tokens only, no network. The iOS Release example builds with tracing enabled. No test/spec files changed; physical-device cold-start testing is not claimed.

Fixes #222.

Consumer follow-up verification

The combined fixes are backported to an immutable 1.6.1 artifact. Both consuming app Android Debug variants, both iOS Debug Simulator variants, four production Metro bundles, 13 web targets, four browser-extension builds, lint and immutable installation pass. All 274 installed non-metadata files match the artifact. This is build verification, not a physical-device authentication/upload certification.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@OskarEichler is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS late prefetch registration bypasses an in-flight token refresh and skip policy

1 participant