LastName FirstName in token with apple-signin

Hello ,
I use auth0.js with capacitor in my IOS app , I have issue with apple review for my Application, why in the apple-sigin birthDate , lastName and FirstName (seperated field) , not in the auth0 token ?

Best Regards

Hey there!

Is that the original question you got from the Apple Review Team?

I got the same issue, we do not get family name and given name in event user object to use for sign up, Apple is rejecting our app

Hey there!

Can you share with us here what exactly Apple Review team said?

Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage

We noticed that after users authenticate their account with Sign in with Apple, they are required to take additional steps before they can access content and features in your app. Specifically:

  • Your app requires users to manually enter their name after using Sign in with Apple.

Sign in with Apple is designed to be a self-contained, all-in-one login system. With security features like built-in two-factor authentication, you can remove additional sign-up steps so users can focus on your app’s content and features.

We have spent few days trying to solve this - support ticket # – #00507557

1 Like

Perfect! Once our developer support engineers help you it would be great if you can share what they find here in the thread for the benefit of others

Is there an update on this? We have the same issue. I’m trying to convert the app over to Auth0 and this will be a deal breaker if I can’t get the first and last names. Thank you!

Do we have any updates on this? @Sprice, I see you have raised similar ticket

Did you manage to resolve this issue? I am stuck at the same place and not sure how to get firstName and lastName of the person who has signed in using Apple social login.

This is a showstopper for us. Any pointers would be greatly appreciated.

Regards,
V

1 Like

Hi there @codenameredpanda - Do you mind creating/testing the following rule and letting us know if it does the trick?

  if (context.connectionStrategy === "apple")  { 
    user.family_name = user.family_name || user.last_name;
    user.given_name = user.given_name || user.first_name;
  }
  callback(null, user, context);
}
2 Likes

@codenameredpanda - let me know if that helped you. To answer your question, yes we got it to work using an example similar to what was just posted. If you need more though, I’m happy to post larger chunks of code.

2 Likes

Hey @tyf , your solution worked like a charm. Thanks for the prompt response and the solution.
@sprice yes the solution provided by @tyf did the trick :slight_smile:

That’s great news! Happy to hear that did the trick for you :smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.