-
Notifications
You must be signed in to change notification settings - Fork 129
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
When i use Apple authentication on iOS, does not get user full name #191
Comments
Hello Santos, Unless I'm wrong, those are restrictions of Apple Authentication Provider for privacy propose. In fact, the user could also change his name during the first authentication and choose to share or not his real email. Please, take a look at documentation for others restrictions:
Anyway, the plugin code is almost exactly as the sample in the docs above, but please, if you find something that we could changed let us know. Best regards. |
Hi @baumblatt I'm having a similar issue and unfortunately, Apple is blocking my app from app store approval because "I should not be prompting users for their name" - but I have to since this plugin is not returning the display name on the firebase user object... It looks like part of the issue is because the firebase SDK does not store the name apple provides as the display name: See (firebase/firebase-ios-sdk#4393) ["The fullName is not returned in Apple's ID token". ] I think the reason firebase has not addressed the issue is to prevent the assumption that users' name should be automatically saved for privacy reasons. I tinkered with this source code and found that |
I'll test #194 more tomorrow but i believe this would resolve the issue. @baumblatt let me know your thoughts - I'm happy to try playing around more with the swift code I just don't know exactly what I'm doing! This is kind of a "gotcha" not documented very well from the firebase iOS SDK so idk how we should handle this to make it clear that apple provides the name once and why it is NOT saved as the displayName in the firebase auth user object. |
i am having the same issue. apple is not approving my app as i am asking for first and last name because plugin does not return it. plz advise how to fix it. |
Your solution doesn't work for me. Did you manage to solve it? |
Yea my fix should work. It's currently working for me. My implementation returns an additional name property on the initial login user object. Just remember that apple only returns the full name on the VERY first sign in. After that, you'll never get it again. If you want to completely reset the apple auth (to get the name again), you need to go into your Apple ID settings and remove your app - this will probably point you in the right direction to do so https://stackoverflow.com/questions/58018184/how-to-revoke-sign-in-with-apple-credentials-for-a-specific-app |
Thank you very much! Your solution helped me! I want to add that I missed this: |
I try this
cfaSignInApple().pipe(first()).subscribe( (user: any) => { user.displayName = this.preferences.userName; user.email = this.preferences.email; }, (err) => { ....
But userName is always empty.
This is a issue or i'm doing something wrong?..
This is my config:
CapacitorFirebaseAuth: {
providers: [
"google.com",
"facebook.com",
"apple.com",
"phone"
],
languageCode: "en",
nativeAuth: false,
permissions: {
"google": [
"profile",
"email"
],
"facebook": [
"profile",
"email"
],
"apple": [
"email",
"name",
"fullName"
]
}
Thanks!
The text was updated successfully, but these errors were encountered: