Skip to content

fix: preserve caller-owned Apple authentication request options - #385

Open
OskarEichler wants to merge 1 commit into
invertase:mainfrom
OskarEichler:codex/immutable-request-options
Open

fix: preserve caller-owned Apple authentication request options#385
OskarEichler wants to merge 1 commit into
invertase:mainfrom
OskarEichler:codex/immutable-request-options

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 27, 2026

Copy link
Copy Markdown

Fix: caller-owned request options are no longer mutated

performRequest(Object.freeze({})) currently throws before reaching native code. A normal call also adds defaults to the caller's object. Copy the options before applying the existing defaults and validation.

Compatibility

No method signature or native payload change. The intentional observable change is that callers no longer receive default fields as an undocumented mutation of their options object. Frozen option objects now work.

Reproduction

24 inline cases cover defaults, explicit options, frozen inputs, validation, credential lookup and event removal. The 10 input-preservation cases fail on baseline and all pass 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.

@mikehardy

Copy link
Copy Markdown
Collaborator

Hey there 👋 - just a note that I'm not going to have the fastest turn around on these but I see the whole batch, thanks a bunch for posting them up and I'll chew through them and merge everything good as fast as I get a chance

Maintainer-wise I did the transition to OIDC publishing and a release to verify the automation recently enough that there should be a clear + easy path to release good fixes through here as I can qualify them

Thanks for your patience

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.

3 participants