Auth0 Home Realm Discovery Fails with Non-Unique Emails Enabled
Last Updated:
Overview
Auth0 fails to route users correctly when administrators enable the non-unique emails feature because Home Realm Discovery (HRD) relies on the email domain to determine the correct connection. Resolve this routing failure by using a different unique identifier, such as a username or phone number, as the entry point for login. When multiple users share the same email address, HRD cannot reliably map the email to a single connection or identity provider, leading to ambiguity in the login flow and resulting in failed authentication attempts.
Applies To
- Auth0
- Home Realm Discovery (HRD)
- Non-Unique Emails
Cause
HRD relies on the email domain to determine the correct connection for a user. When multiple users share the same email address in a non-unique configuration, HRD cannot reliably map the email to a single connection or identity provider. This creates ambiguity in the login flow, leading to incorrect routing or failed authentication attempts. Consequently, Auth0 does not support HRD alongside non-unique emails.
Solution
Configure the login flow to rely on a different unique identifier as the entry point for authentication by implementing one of the following options:
- Use a username as the primary identifier.
- Use a phone number as the primary identifier.