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
🐛 [firebase_auth] Firebase user displayName not filled from Apple Sign-in credentials #7274
Comments
I noted this behavior / issue while verifying the other issue, #7272, so confirming that is replicable on latest stable. stable flutter doctor -v
|
have you found any solution @boris-hocde? |
@tp-coderbabu Yes, you need to set the Firebase display name from final appleCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
nonce: nonce,
);
final fixDisplayNameFromApple = [
appleCredential.givenName ?? '',
appleCredential.familyName ?? '',
].join(' ').trim();
// ... once the authentication is complete
if (fixDisplayNameFromApple != null && firebaseAuthUser.displayName == null) {
await firebaseAuthUser.updateDisplayName(_fixDisplayNameFromApple);
firebaseAuthUser.reload();
} |
Thank you so much @boris-hocde |
Hey @boris-hocde, thanks for providing a solution to the issue. This is an ongoing problem on the firebase-ios-sdk which you can track here. FlutterFire simply wraps around this SDK so it needs to be fixed upstream. |
Bug report
Hi,
I'm facing an issue with Apple Sign-in.
With the documented method, the user given name and family name are not copied from Apple credentials to the Firebase user.
This results in Apple rejecting app submissions because of the guideline 5.1.1:
Steps to reproduce
displayName
Expected behavior
We should find back in
displayName
what the user provided as given name and family name while granting the Apple ID permission. "Timm" in this example.Sample project
https://gitlab.com/boris.hocde1/authlink
appleCredential
contains the given name & family name (see here)displayName
is null (see here)Video showing the issue for this sample app
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: