Auth0 Home Blog Docs

Link users by email rule - THE USER DOES NOT EXIST

Hi, we added the rule to automatic account linking by email.
Problem is that after linking, the first login returns an error that THE USER DOES NOT EXIST.

However linking is successful, and the second login works fine - the user is signed in as the first, primary user, as expected.

I was able to find a workaround on this, changed line 56 from
callback(null, user, context);
callback(null, originalUser, context);

Is my workaround correct or not? Can’t understand why seems nobody else faced with this issue…

Hey there @yevhen.voroniuk, welcome to the Auth0 Community!

I’d like to help with what you are facing. When you get a chance can you direct message me the tenant you are working with along with recording a har file of the broken flow, be sure to select “Preserve log” to catch redirects and scrub the file of user passwords before passing it over. Thanks in advance!


I’m seeing the same error on our production site over the last couple of days. Users logging in with a SAML connection, and trying to link with a Username-Password-Authentication user.

In the logs I see:

“error”: {
“message”: “The user does not exist.”,
“oauthError”: “access_denied”,
“type”: “oauth-authorization”

Hi - I’m seeing the same issue (linking a SAML user with a database user). Did you work out what was happening?