When Will the Post-User-Registration Action Event Object Not Contain Email and/or Username

Problem statement

After reading the documentation on the Post-User Registration Event object, it lists the ‘email’ and ‘username’ as optional properties. Under what conditions is it expected that the username/email will not be included in the event object? This is necessary so our Action code can accommodate those edge cases appropriately.

Solution

Auth0 does not have an exhaustive list of situations where the username/email will not be present in a Post-User-Registration event object. However, one scenario where this could occur is if a user registers with an SMS Passwordless connection. In this situation, no email or username would be present in the event object during that Action execution.