-
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
Creating client_grant for management API #366
Conversation
@joshcanhelp for these bigger commits, the formatting type corrections just add unnecessary noise to the review. I'm all for improving readability and consistent. However, in the future these would be better in a separate PR. |
Please rebase and a good time to try the mergetool 😄 |
…e client created; DB version upgrade to 16 and resulting changes needed (client grant and app_type update); notice and flag for failed client grant addition; set app_token_audience and check for client grant flag when saving a new app token; helper functions for converting client_id to a key
7ce0eac
to
e6c9d84
Compare
@cocojoe - GTG |
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.
@joshcanhelp it would be great if you could provide some screenshots of the upgrade process. Thanks
if ( !empty( $app_token ) && | ||
!empty( $connection_id ) && | ||
!empty( $migration_token ) ) { | ||
|
||
$response = $operations->update_wordpress_connection( | ||
$operations->update_wordpress_connection( |
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.
$response never used?
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.
Nope!
} else { | ||
$options->set('use_lock_10', true); | ||
} | ||
if ( strpos( $cdn_url, '10.' ) === false ) { |
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.
I mentioned this but leaving it for other reviewers, in the future let's cover these changes in a separate internal PR, to keep the review process cleaner.
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.
@cocojoe - Understood. Can all formatting and minor stuff go together in a final cleanup PR or something?
Most of the cases where there was formatting changes were part of a minor refactor. In this case, I moved all the vars we were using to the top of that method and reformatted a couple of the blocks.
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.
Yeah, it's not a priority. However, if you have some time and want to do a lint pass and also adopt some linting standards then it would be good to do. Although more likely this will be for the vNext when this can be standardised from the start.
trigger_error( __( 'Method dieWithVerifyEmail is deprecated.', 'wp-auth0' ), E_USER_DEPRECATED); | ||
WP_Auth0_Email_Verification::render_die( $userinfo ); | ||
} | ||
|
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.
Separate PR in future.
$error = __( 'You need to specify domain', 'wp-auth0' ); | ||
$this->add_validation_error( $error ); | ||
$completeBasicData = false; | ||
$this->add_validation_error( __( 'You need to specify domain', 'wp-auth0' ) ); |
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.
This is nice
@cocojoe - If the upgrade works without manual intervention, you won't see anything at all. But, if not, you'll see this message at the top of all screens if you're an admin ( You can simulate this on your local install by turning off the Non-Interactive Client created by WP in the Auth0 Management API: ... and adding an option:
|
I think it looks good, I would add a patch to the client to set the |
@glena - Looks like the clients we're creating have the three |
Clients used with this plugin need to have a specific grant to the management API in order to handle certain actions like verification emails. The client also needs to have an app_type set, in this case "Regular Web Application."
This pull request: