feat(auth, ios): add fullName support for Sign in with Apple credentials - #9096
feat(auth, ios): add fullName support for Sign in with Apple credentials#9096russellwheatley wants to merge 11 commits into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces support for capturing and forwarding the user's full name during the initial Sign in with Apple flow on iOS. By extending the credential creation process and updating the native bridge, the library now allows developers to pass name components that Firebase uses to populate the user's display name. Note that this feature is iOS-specific, as the Firebase Android SDK does not currently support credential-level name injection; on Android, developers should continue to use Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds support for forwarding the user's full name (fullName) during Sign in with Apple on iOS, allowing Firebase to store it as the account's display name on first sign-in. This is implemented by updating the TypeScript types, the native bridge on iOS to parse fullName into NSPersonNameComponents, and adding corresponding unit and type tests. Android and Web platforms gracefully ignore this field to maintain spec parity. The review feedback suggests two improvements in RNFBAuthModule.mm: optimizing the Apple provider check to avoid unnecessary dictionary parsing and allocation, and ensuring personNameComponentsFromDictionary: returns nil if no valid name components are present to prevent passing empty objects to the Firebase SDK.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9096 +/- ##
==========================================
+ Coverage 63.47% 63.57% +0.10%
==========================================
Files 389 389
Lines 30763 30799 +36
Branches 4935 4944 +9
==========================================
+ Hits 19524 19576 +52
+ Misses 10533 10513 -20
- Partials 706 710 +4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Hello 👋, this PR has been opened for more than 14 days with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically |
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
mikehardy
left a comment
There was a problem hiding this comment.
LGTM - one comment on making the local test permanent (and if I understand correctly, it will work on an Apple simulator these days)
Reasonable fix though, can't think of another way to pass this through even though it's pretty single purpose ("OAuth, but only Apple provider, and only iOS...")
Leaving as approved un-merged, take the test feedback and do it, or ignore/defer that completely at your option, the fix itself looks good
Adds an "Auth Apple fullName Test" screen (tests/local-tests/auth) used to
manually verify OAuthProvider('apple.com').credential({ fullName }) end to
end on a real device/simulator, using @invertase/react-native-apple-authentication
to drive a genuine ASAuthorizationController flow. Also enables the Sign in
with Apple capability/entitlement on the testing app and corrects its
PRODUCT_BUNDLE_IDENTIFIER to the App ID actually registered on the Apple
Developer Portal (io.invertase.testing).
# Conflicts: # tests/ios/Podfile.lock
The io.invertase.testing correction is a separate infra concern (also needs a GoogleService-Info.plist update) and will land in its own PR. Keep this PR scoped to the fullName feature + its Sign in with Apple capability/entitlement.
Resolve conflicts by keeping main's RNFBAuthHelper SPM split and porting Apple fullName credential handling into the helper. Take main's Podfile.lock (CI regenerates via tests:ios:pod:install).

Description
Adds support for forwarding Apple's
fullName(NSPersonNameComponents) to Firebase when signing in with theapple.comprovider, so the user's display name can be set on first authorization instead of being lost.AppleFullPersonNametype and an optionalfullNamefield onOAuthCredentialOptions.AppleAuthProvider.credential()andOAuthProvider('apple.com').credential()now accept and forwardfullNameon the resultingOAuthCredential(including throughtoJSON/fromJSON).signInWithCredentialforwardsfullNametoFIROAuthProvider.appleCredentialWithIDToken:rawNonce:fullName:, so Firebase stores it asdisplayNameon the newly created account.fullNameis accepted (for TurboModule spec parity) and intentionally ignored; apps should callupdateProfile()after sign-in on Android.firebase-js-sdk'sOAuthCredentialhas nofullNamefield on any platform); the parameter is accepted and ignored.signInWithCredentialsignature.Related issues
Linear: CP-158 (Auth: support Apple fullName in Sign in with Apple credential).
closes #8570
Manual Verification
Verified end-to-end on a physical iOS device using a local test harness (tests/local-tests/auth/apple-full-name.tsx + a native RNFBAppleSignInModule wrapping ASAuthorizationController - not part of this PR):
OAuthProvider('apple.com').credential({ idToken, rawNonce, fullName }) → signInWithCredential completes successfully; sign-in/out works repeatedly with no errors.
The screenshot below is a repeat sign-in (not this account's first-ever authorization for the bundle id), so Apple correctly withheld fullName this time - expected Apple behavior, not a regression. The native bridge change in RNFBAuthModule.mm that forwards a supplied fullName to FIROAuthProvider appleCredentialWithIDToken:rawNonce:fullName: is covered by the unit tests and provider.e2e.js.
apple-full-name manual e2e
Happy to push up the apple-full-name.tsx manual harness (and its supporting native module) into this PR if reviewers want a repeatable way to re-verify - flagging it adds a small amount of test-only native (Objective-C) code to the testing app.
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
yarn tests:jest packages/auth— 147/147 tests passing, including new coverage forfullNamemapping, JSON round-tripping, and native bridge forwarding.yarn lint:js,yarn tsc:compile,yarn compare:types— all clean.yarn lint:ios:check(clang-format) andgoogle-java-format— native changes conform.node ./scripts/codegen-verify.mjs— regenerated codegen artifacts match exactly, no drift in any other package.Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon Twitter