fix: await startup token refresh for late iOS prefetches - #223
Open
OskarEichler wants to merge 1 commit into
Open
fix: await startup token refresh for late iOS prefetches#223OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
|
@OskarEichler is attempting to deploy a commit to the Margelo Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.