Migrating between environments – Auth0 Not Ready
-
Hi,
I have Auth0 up and running on a multisite. I am now setting up additional environments.
– Production
– Staging
– Testing
– LocalEach environment will use the same settings and the process of creating each environments involves a full DB migration with minimal find/replace actions eg site url. This is pretty standard stuff.
The problem
I have been able to successfully get Auth0 working on a local and non local (testing) environment, however, I’ve noticed that when migrating the DB between environments (testing to local or the other way), Auth0 always prompts the Setup Wizard and does not respect the values already stored in the options table.
Looking at the Plugin code, it appears to check if the options for domain, client_id and client_secret exist to deem Auth0 “ready”. This check appears to be failing, however, when looking in the options table, i can see the serialized values do indeed exist.
public static function ready() { $options = WP_Auth0_Options::Instance(); if ( ! $options->get( 'domain' ) || ! $options->get( 'client_id' ) || ! $options->get( 'client_secret' ) ) { return false; } return true; }
As a result, each time I update the DB for my WP install on another environment, I need to go and re-add the Auth0 settings, and because its a multisite, I have to do this on many sites.
- The topic ‘Migrating between environments – Auth0 Not Ready’ is closed to new replies.