Skip to content

feat(auth): add support for fullName when using Sign in with Apple #8570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

andrewdollard
Copy link

Description

Adds the ability to set the user's full name when using Sign In With Apple.

When signing in with Apple using e.g. react-native-apple-authentication, Apple provides a fullName value which must be displayed in the app; furthermore, Apple provides this data only on initial sign-up and not on subsequent sign-ins.

firebase-ios-sdk supports setting that value when signing in via Firebase with an Apple credential; however, react-native-firebase does not currently provide a way to pass the fullName value to the underlying Firebase native code. As a result, using Sign In With Apple requires storing the user's name data in the app instead of in Firebase as with other social auth providers.

This PR adds a signInWithAppleCredential method to the auth module, which passes the fullName value to appleCredentialWithIDToken in the Firebase iOS SDK so it can be forwarded to Firebase on sign-up.

Notes:

  • AppleAuthProvider.credential is extended to take an optional fullName parameter
  • signInWithAppleCredential accepts a credential with or without the fullName property
  • The behavior of the existing signInWithCredential method is unchanged

This feature is iOS only; AFAICT this functionality is already handled by the Firebase Android SDK (docs).

Related issues

Fixes #7603

Release Summary

Adds ability to set fullName when using Sign In With Apple

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

I wasn't able to add e2e tests as the Firebase emulator doesn't support social auth, but I am running it in my own app:

IMG_7870

🔥

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

Copy link

vercel bot commented Jun 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2025 5:34pm

@CLAassistant
Copy link

CLAassistant commented Jun 14, 2025

CLA assistant check
All committers have signed the CLA.

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.

Extend Sign in with Apple OAuth Provider - add ability to set full name
2 participants