-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove automatic client grant creation #637
Conversation
@@ -441,11 +441,6 @@ public static function uninstall() { | |||
delete_option( 'widget_wp_auth0_widget' ); | |||
delete_option( 'widget_wp_auth0_social_amplification_widget' ); | |||
|
|||
delete_option( 'wp_auth0_client_grant_failed' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options are removed upon plugin update so no need to remove when the plugin is uninstalled.
@@ -102,128 +98,13 @@ public function install_db( $version_to_install = null, $app_token = '' ) { | |||
} | |||
} | |||
|
|||
// App token needed for following updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API token is no longer used during the migration process.
@@ -335,19 +335,6 @@ public function basic_validation( $old_options, $input ) { | |||
? $input['auth0_app_token'] // TO BE DEPRECATED | |||
: $old_options['auth0_app_token'] ); // TO BE DEPRECATED | |||
|
|||
// If we have an app token, get and store the audience |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the automatic update attempt when a new API token is saved.
Changes
In version 3.5.0 and 3.5.1, a Client Credentials grant was automatically created between the WP site and the Management API to retrieve user data. This could only happen if a valid API access token was already saved in the setting page. This grant is no longer required for the plugin to function properly and uncommon for sites that have been live for longer than the token expiration (24 hours be default).
The number of sites that could use this automatic update was small to begin with and the number of sites that are running < 3.5.x are down to 8% (plugin stats).
This PR removes the automatic check and attempted fix in preparation for removing the admin-stored API token. Sites that update from < 3.5 will still receive user data via the ID token and updates that did not function before the update (user email and password updates, email verification resending) will continue to not function but log a clear error message.
This PR also deprecates the methods that would display an admin message if the process failed.
Testing
Checklist