Problem statement
For Apple, the account did get created in Auth0, but it doesn’t contain any username or email. It feels like Apple didn’t provide any of this information.
Symptoms
- After a user “signs in with Apple,” the profile created in the Auth0 tenant doesn’t contain ‘name’ and ‘email address’ attributes.
Cause
The cause of the issue could be various; here are a few possibilities:
-
Do not use Auth0 Developer Key for the Apple connection.
– See Test Social Connections with Auth0 Developer Keys -
The ‘name’ and ‘Email Address’ attributes are enabled in the Apple connection (under the ‘settings’ tab), as shown below: To ensure any cached data is updated, follow these steps:
a) Disable the ‘name’ and ‘Email Address’ attributes, save the settings, then re-enable the ‘name’ and ‘Email Address’ attributes, then save the settings.
b) After the ‘name’ and ‘Email Address’ attributes are enabled and saved, delete the Apple connection user.
c) Log in with the same user again to re-create the user profile in the Auth0 tenant. -
In some scenarios, Apple does not send ‘email’ and ‘name’ to the client, which is Auth0 in this case.
– This value may be empty for Sign in with Apple at Work & School users. For example, younger students may not have an email address. Apple Developer Documentation -
There are other scenarios (unexpected behavior) in which Apple doesn’t send the email and name. Apple Developer Forums
Solution
Refer to the ‘Cause’ section.