Unique Email Address Per User Requirements with Auth0

Last updated: Dec 10, 2024

Overview

This article explains whether a unique email address is needed under the following circumstances:

  • When using email + password authentication with database connections
  • When using username + password authentication

Applies To

  • Email Address
  • Database Connections
  • Password Authentication

Solution

Auth0 enforces the uniqueness of the email or username within a connection.

For example, two users cannot have the same email address in the same connection, such as a regular DB email/password connection, but two users can have the same email address if they belong to different connections, such as a social connection and a regular DB email/password connection. Account linking can be used to ensure uniqueness across connections in this scenario.

NOTE: If a database connection does not have Email Address set as one if the Identifier attributes, email uniqueness will still be enforced for that connection.