Conversation
…ct the app during the token validation.
dkotter
requested changes
May 7, 2025
dkotter
reviewed
May 13, 2025
dkotter
previously approved these changes
May 13, 2025
Collaborator
dkotter
left a comment
There was a problem hiding this comment.
Tested this in conjunction with the middleware PR that adds disconnect support and everything seems to be working great. For now, going to leave this unmerged as we've already submitted the plugin to WordPress.org for review. Will merge this in once that is approved and we're ready for public release.
dkotter
approved these changes
May 14, 2025
Collaborator
Since we needed to re-submit anyway to resolve a few issues, merged this in so it will be included as part of the initial review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
/wp-json/jobber/v1endpoint as theclientUrlto the middleware./disconnectfor the disconnect request.get_endpoint( $path )method so the$urlvariable is the base API URL.$refresh_endpoint = Jobber::get_endpoint( 'refresh' ); // middleware refresh URL$disconnect_endpoint = Jobber::get_endpoint( 'disconnect' ); // middleware disconnect URL$token_endpoint = Token::get_endpoint( 'generate' ); // WP token generate URL$auth_endpoint = Token::get_endpoint( 'validate' ); // WP token validate URLtokenUrlparameter with the initial/authrequest./token/generateURL for us to generate aclient_token./wp-json/jobber/v1/disconnectendpoint to handle Jobber > WP disconnects.POSTrequest to this endpoint when a Jobber Webhook is received.POSTrequest will validate thejobber_tokenfrom the middleware and delete the DB records if successful.POSTrequest to[middleware]/disconnectwhen the WP "Disconnect" button is clicked.POSTrequest will include theclientTokenparameter.clientTokenwith thedisconnectparameter appended to the API endpoint.disconnectargument and run thedisconnect_client()method on successul validation.&jobber_disconnected=trueparameter in the URL.POSTrequest may not be complete by time the page refreshes)Closes #19
How to test the Change
Changelog Entry
Credits
Props @TylerB24890
Checklist: