We are looking to integrate Auth0 with an existing WordPress site/application — we will soon be moving off of WordPress to a custom backend, using Auth0 for authentication, but that process will take time. In order to be able to release an iOS/Android app that works with our existing backend, we want to start using Auth0 now, so that when the new backend is ready, the app doesn’t require reworking all the user authentication.
The plugin available in the WordPress plugin repository is out of date and apparently not supported since 2023, but unfortunately, all of your developer documentation around this plugin refers to the old version, not the new version (5.x available on GitHub). So many of the configuration and settings are difficult to decipher.
Primarily, we are wanting to leverage the on-demand sync feature that was available in the previous version of the program, which, by all accounts, seemed to work well for automatically creating an account in Auth0 when a user tries to log in with an account that already exists in the previous WordPress-native user authentication. None of the updated documentation provides any insight on how to configure the Database Action Scripts that is used to migrate existing users as outlined in the previous documentation here: https://auth0.com/docs/customize/integrations/cms/wordpress-plugin/user-migration-in-login-by-auth0
In the newest version of the plugin, what is the appropriate configuration for enabling this same kind of feature?
The on-demand user migration feature is no longer configured within the WordPress plugin itself but is now managed in the Auth0 Dashboard using Database Action Scripts. To set this up, you’ll need to create a new Custom Database Connection in Auth0 and enable the Import Users to Auth0 setting. Next, you’ll add the provided JavaScript code for the Login and Get User scripts from the Auth0 WordPress plugin’s GitHub repository. Crucially, you must configure these scripts with your WordPress site’s endpoint URL and the security token generated by the plugin. This setup allows Auth0 to find and authenticate existing users in your WordPress database on their first login, automatically migrating them to the Auth0 database in the process.
The Login By Auth0 integration available on Wordpress should still be a viable option in regards to migrating users. Unfortunately, as you have mentioned, there is a lack in our documentation regarding the latest versions (v5 specifically). On this matter, I would recommend reaching out to Wordpress regarding any difficulties in setting it up.
Otherwise, I would not recommend migrating users from Wordpress via a custom database script due to the fact that they use a special hashing algorithm and encryption methods. Because of that, it is not a supported format for a migration using a custom database script and you might encounter several issues and possibly not being able to migrate your users at all.
This is a shocking terrible answer from a Community Engineer here.
WordPress would not have the requisite knowledge or experience to answer questions about Auth0’s own plugin, and they would, obviously, not support it regardless. This is like telling someone to come to the Auth0 forums to fix a problem unrelated to Auth0 at all.
I have managed to create a small plugin with just the migration functionality from the earlier version of the plugin, which appears to work alongside the newer plugin well in my limited testing.
Generally speaking though, I think that auth0 should dedicate the time necessary to actually release this plugin in a way that WordPress users can actually use it. The composer dependency, outdated documentation, and apparently terrible developer support, is all very disappointing.