Problem statement
During an operation related to a user from a custom database connection, the following error occurs:
Please verify the provided email/username or password
Symptoms
The presentation of the problem (e.g. error messages, description of behavior).
- There is a custom DB with Import Mode turned on.
- User tries to perform an action such as reset password
- An error similar to “DB Get user Custom script: please verify the provided email/username or password.” is returned
Cause
This can happen when a different email address is sent for a particular user ID and there is already a record of one email address. This could happen, for example, when the user’s email address changes in the legacy DB but there is already a shadow profile in Auth0 with the old email.
Solution
The delete connection user by email API endpoint can be used here to clean the shadow user. Please refer to this documentation:
https://auth0.com/docs/api/management/v2#!/Connections/delete_users_by_email