Apple ID users missing email in Auth0

I’m seeing an issue with some new users logging in with Apple ID where Auth0 does not get their email.

  • In the Auth0 Users list, these users are shown with an empty user.

  • When I open the Raw JSON for the user profile, there is no email field.

  • This only happens for some new Apple ID users, not all.

Because our app must use the user’s email for core features, this is causing problems.

I’d like to understand:

  1. In what situations would Apple/Auth0 not provide an email for a new Apple ID login?

  2. Is there any recommended way to enforce or guarantee an email?

Any guidance on how to debug and properly handle this case would be really appreciated.

i also feel like it‘s not because of apple email configuration. I tried to use a new apple account to login and select hide email address for this account. In this case apple will give me another privaterelay email address to represent me,which is different from the empty email scenario above

Hi @nicolenxn1234,

The missing email is not a bug in your code or Auth0 configuration. It is a deliberate privacy feature of Apple’s API. Apple only shares the user’s name and email address once: the very first time the user consents to your app.

If you delete the user in Auth0 to “start fresh” but do not revoke the permission in the user’s Apple ID settings, Apple considers the user “already consented.” On subsequent logins, Apple sends only the unique User ID (Subject), resulting in an Auth0 profile with no email address.

Here’s how you can fix it:

1. Fix for Testing (How to get the email again)

To simulate a “true” first login and receive the email payload again, you must manually revoke your app’s access on the user’s Apple device. This way, when you log in again, Apple will treat it as a fresh consent and send the email payload.

2. Production Strategy (How to enforce email presence)

Since you cannot force Apple to resend the email for existing users, you must handle “email-less” logins gracefully in your authentication pipeline. The standard way to do this in Auth0 is using Actions to implement “Progressive Profiling.”

You can create a Post-Login Action that checks if the email is missing and redirects the user to a web form where they must manually enter it.

Example:

exports.onExecutePostLogin = async (event, api) => {

  // Check if the email is missing

  if (!event.user.email) {

    // Option A: Deny access (Simple but harsh)
    // api.access.deny('Email is required to use this application.');

    // Option B: Redirect to a custom form to collect email (Recommended)
    // api.redirect.sendUserTo('https://your-app.com/collect-email', {
    //   query: { session_token: event.transaction.session_id }
    // });

  }
};

If you use Option B, when the user submits their email, you would update the Auth0 user profile using the Management API and then resume the authentication flow.

If you have any further questions, please don’t hesitate to reach out.

Have a good one,
Vlad

1 Like

thank you Vald! This is really helpful :grinning_face:

1 Like

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