Skip to content

feat(auth, ios): add fullName support for Sign in with Apple credentials#9096

Draft
russellwheatley wants to merge 6 commits into
mainfrom
apple-full-name
Draft

feat(auth, ios): add fullName support for Sign in with Apple credentials#9096
russellwheatley wants to merge 6 commits into
mainfrom
apple-full-name

Conversation

@russellwheatley

@russellwheatley russellwheatley commented Jul 9, 2026

Copy link
Copy Markdown
Member

Description

Adds support for forwarding Apple's fullName (NSPersonNameComponents) to Firebase when signing in with the apple.com provider, so the user's display name can be set on first authorization instead of being lost.

  • Adds an AppleFullPersonName type and an optional fullName field on OAuthCredentialOptions.
  • AppleAuthProvider.credential() and OAuthProvider('apple.com').credential() now accept and forward fullName on the resulting OAuthCredential (including through toJSON/fromJSON).
  • iOS: signInWithCredential forwards fullName to FIROAuthProvider.appleCredentialWithIDToken:rawNonce:fullName:, so Firebase stores it as displayName on the newly created account.
  • Android: the Firebase Android SDK has no credential-level equivalent, so fullName is accepted (for TurboModule spec parity) and intentionally ignored; apps should call updateProfile() after sign-in on Android.
  • Web is unaffected (firebase-js-sdk's OAuthCredential has no fullName field on any platform); the parameter is accepted and ignored.
  • Regenerated the TurboModule codegen artifacts for the extended signInWithCredential signature.

Related issues

Linear: CP-158 (Auth: support Apple fullName in Sign in with Apple credential).
closes #8570

Release Summary

Sign in with Apple credentials now support forwarding the user's fullName, so it can be stored as displayName on first sign-in (iOS only; ignored on Android/Web).

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

  • yarn tests:jest packages/auth — 147/147 tests passing, including new coverage for fullName mapping, JSON round-tripping, and native bridge forwarding.
  • yarn lint:js, yarn tsc:compile, yarn compare:types — all clean.
  • yarn lint:ios:check (clang-format) and google-java-format — native changes conform.
  • node ./scripts/codegen-verify.mjs — regenerated codegen artifacts match exactly, no drift in any other package.

Think react-native-firebase is great? Please consider supporting the project with any of the below:

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 updateProfile() post-sign-in.

Highlights

  • Apple Full Name Support: Added support for passing fullName (givenName, familyName, etc.) when using Sign in with Apple credentials on iOS, allowing Firebase to set the user's display name upon initial account creation.
  • Native Bridge Updates: Updated the native signInWithCredential method across Android and iOS to accept an optional fullName parameter, ensuring the data is correctly passed to the underlying Firebase SDKs.
  • TypeScript and Testing: Updated TypeScript definitions to include AppleFullPersonName and OAuthCredentialOptions.fullName, and added comprehensive unit tests to verify the credential mapping and bridge forwarding.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/auth/ios/RNFBAuth/RNFBAuthModule.mm
Comment thread packages/auth/ios/RNFBAuth/RNFBAuthModule.mm
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.46154% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.73%. Comparing base (3933b45) to head (e128b32).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9096      +/-   ##
============================================
+ Coverage     58.61%   58.73%   +0.12%     
  Complexity     1616     1616              
============================================
  Files           503      503              
  Lines         39178    39210      +32     
  Branches       5807     5810       +3     
============================================
+ Hits          22962    23027      +65     
+ Misses        14811    14780      -31     
+ Partials       1405     1403       -2     
Flag Coverage Δ
android-native 53.56% <ø> (ø)
e2e-ts-android 49.96% <14.29%> (-0.01%) ⬇️
e2e-ts-ios 53.98% <50.00%> (+0.10%) ⬆️
e2e-ts-macos 41.47% <14.29%> (-<0.01%) ⬇️
ios-native 53.98% <50.00%> (+0.10%) ⬆️
jest 49.88% <100.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikehardy

Copy link
Copy Markdown
Collaborator

I'm enjoying watching these creep up, even if ever so slowly, now that coverage is on everywhere and e2e is pretty reliably working+uploading the reports for tracking:

image

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