Skip to content

fix(ios): clear authorization callbacks before invoking them - #387

Open
OskarEichler wants to merge 1 commit into
invertase:mainfrom
OskarEichler:codex/native-callback-ownership
Open

fix(ios): clear authorization callbacks before invoking them#387
OskarEichler wants to merge 1 commit into
invertase:mainfrom
OskarEichler:codex/native-callback-ownership

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 27, 2026

Copy link
Copy Markdown

Fixes: one-shot authorization callbacks and safe button callbacks

  • Clear the stored authorization completion before calling it, while retaining a local copy for invocation. Reentrant or late callbacks cannot invoke an already-consumed block; completion is not accessed after the owning delegate can be released.
  • Do not invoke the button event block when React has not attached it or has removed it.

Compatibility

No public API changes. Authorization settles once, and a button without an attached callback does nothing instead of dereferencing a null block.

Reproduction

Compiled the actual Objective-C callback bodies against Foundation. A reentrant error callback runs twice before the fix and once after; the completion is cleared. Late callbacks, missing button callbacks and an attached button callback are also exercised after the fix.

Verification

  • Upstream ESLint and existing TypeScript usage checks pass.
  • Focused inline reproductions compare unchanged 5f7a8d7 with the fix; no test/spec files were changed.
  • React Doctor reports 100/100 on the changed JavaScript scope.
  • Consumer verification now passes on React Native 0.87.1: both Android Debug flavors, both iOS Simulator Debug schemes (unsigned), all four production-mode Metro bundles, immutable Yarn install and app lint. All seven changed installed source files match the verified fork.
  • No real Apple sign-in, account changes, physical-device authentication, macOS/visionOS runtime checks or signed release archives were performed.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck 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.

2 participants