firebase / FirebaseUI-iOS

iOS UI bindings for Firebase.
Apache License 2.0
1.5k stars 467 forks source link

The FIRUser displayName appears empty when using 'Sign in with Apple' #1168

Open mark-osypenko opened 9 months ago

mark-osypenko commented 9 months ago

The library does not utilize the complete name provided by Apple. Instead, it constructs a FIROAuthCredential using only the token and rawNonce.

Steps to reproduce:

  1. Sign in with Apple

Observed Results:

FIRUser displayName is empty

Relevant Code:

need to replace in FUIOAuth.m line 371

FIROAuthCredential *credential = [FIROAuthProvider credentialWithProviderID:@"apple.com" IDToken:idToken rawNonce:rawNonce];

with

FIROAuthCredential *credential = [FIROAuthProvider appleCredentialWithIDToken:idToken rawNonce:rawNonce, fullName: appleIDCredential.fullName];