Auth0 trying to create duplicate user on wordpress

Hello,
I am configuring Auth0 with WordPress. I have the database connection setup and everything configured. I have the create new user disabled on WordPress as we use our custom signup form for our members.
The issue is that when i login from my WordPress account, the user gets created in Auth0 with all the proper id and email, but WordPress is trying to create a new user instead of just using the existing user. I want to continue using WordPress as the starting point for my members to signup.
here are my settings:
WordPress:

  1. Allow signup : disabled
    Auth0:
  2. Database - Import users to Auth0 → ON
  3. Disable Signup - OFF
  4. User my own database → ON

thanks,
Me

Hello!
The issue where WordPress tries to create a new user upon login despite existing in Auth0 (created via your custom signup) likely stems from the Auth0 WordPress plugin not correctly mapping the WordPress login attempt to the pre-existing Auth0 user. The solution lies in carefully reviewing and configuring the user linking/mapping settings within the Auth0 WordPress plugin. Ensure it’s set to identify users based on a consistent identifier (likely the email address) used in both your custom signup and WordPress login, potentially triggering a user linking process if needed. Review the plugin’s documentation for precise configuration options.

Hi @iammehdi

Welcome to the Auth0 Community!

As @Brian297Perkins has mentioned regarding the duplicated users in Wordpress, most probably the cause would be a misconfiguration regarding the user mapping. Instead of Wordpress mapping the login to an existing user, it appears to be ignoring that completely and attempting to create a new one.

For more information regarding integrating Auth0 with Wordpress, you can review our documentation on the matter.

If you have any other questions, feel free to leave a reply!

Kind Regards,
Nik

Thanks Brian, the issue was with Auth0 plugin as it installed the older v4 version.
I followed the instructions to install the latest Auth0 v5 plugin, now i have a different issue.

  1. As soon as i active Auth0 plugin, I am unable to update the pages in wordpress.
  2. When i go to a page which requires login, i get the Auth0 login page and i am able to login successfully, the user is created in Auth0, everything is perfect there but i am taken to the homepage after login, even if i try to click my page link it stops redirection and i am still logged in.
    anyone facing this issue?
    should i just give up on Auth0 wordpress plugin and go the SDK route?
    thanks,
    Mehdi

I have more update on this, so i am back to the point where Auth0 is trying to create a new user in WordPress even with version 5. I have set email as the identifier in the Auth0 plugin and still it creates a new user in wordpress. The email address of the user is same in both Auth0 and WordPress. I also noticed that i dont see the auth0_status cookie as mentioned in the troubleshooting steps.

Hey @nik.baleca - I am now on the new v5 plugin. I have tried disabling caching, adding the cookies and url to be excluded from cache but i havent been able to make it work. It did work only once and i see in the db that user is mapped. After the initial user i keep seeing “invalid state” errors. I am on cloudways hosting if that help. I do see in the docs that i should see auth_state cookie, but i havent seen it even when once it worked.
could you please provide some other workaround as i am stuck here.

thanks,
M