docs: Document the root-isolate requirement for Amplify (#5302) - #7273
Draft
cadivus wants to merge 1 commit into
Draft
docs: Document the root-isolate requirement for Amplify (#5302)#7273cadivus wants to merge 1 commit into
cadivus wants to merge 1 commit into
Conversation
Documents the constraint the #5302 guardrails now enforce, in the README's existing platform-support section. Docs only; no code change. Written around the two bounds that actually apply, rather than a per-category list: - Platform channels only work one way. After `BackgroundIsolateBinaryMessenger.ensureInitialized` a secondary isolate can call into the host, but never receive messages back -- Flutter delivers host messages to the root isolate only. This makes every callback-driven API permanently root-isolate-only: DataStore observe and Hub events, push notification handlers, Hosted UI redirects, and `NativeAuthPlugin.setUp`. - Persistent state is shared and unsynchronized. The native SDKs and the credential store are one per process, and nothing serializes access across isolates. Deliberately does NOT document "configure in any isolate" as a supported feature. See the task report: the safe surface is too thin to advertise until a broker serializes credential access through the root isolate.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/isolate-guard-auth #7273 +/- ##
==========================================================
Coverage ? 31.61%
==========================================================
Files ? 25
Lines ? 2056
Branches ? 789
==========================================================
Hits ? 650
Misses ? 1406
Partials ? 0 🚀 New features to boost your workflow:
|
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.
amplify_flutterREADME's existing Category / Platform Support section (where platform caveats already live).observe/Hub, push handlers, Hosted UI redirect,NativeAuthPlugin.setUp); (2) persistent state is shared and unsynchronized — the native SDKs and credential store are one per process and nothing serializes access across isolates.writeManyin the credential store isFuture.waitover independent per-key writes with no lock, CAS or versioning anywhere inamplify_auth_cognito_dartoramplify_secure_storage*, so two isolates refreshing tokens can interleave per key and leave a mixed credential set (new access token + old refresh token). That is worse than last-write-wins.@internaland the user-facing contract should land with the broker that makes it safe. Details and the recommended PR5 reframe are in the task report.