Skip to content

Revoke and Remove Tokens on Disconnect#282

Merged
n7studios merged 4 commits intomainfrom
revoke-remove-tokens-disconnect
Apr 13, 2026
Merged

Revoke and Remove Tokens on Disconnect#282
n7studios merged 4 commits intomainfrom
revoke-remove-tokens-disconnect

Conversation

@n7studios
Copy link
Copy Markdown
Contributor

Summary

When the user clicks the Disconnect button at WooCommerce > Settings > Integrations > Kit:

  • Revokes the access and refresh tokens by calling the oauth/revoke endpoint
  • Removes the v3 API Key, v3 API Secret, v4 Access Token, v4 Refresh Token and v4 Token Expires settings from the database

Adds named parameters to tests that were missing for consistency.

Testing

  • testCredentialsAndResourcesAreDeletedOnDisconnect: end to end test confirming that the API Key, API Secret, Access Token and Refresh Token are deleted from the Plugin.
  • testCredentialsDeletedAndInvalidWhenRevoked: integration test confirming that the credentials are deleted from the Plugin and no longer work i.e. are revoked, when the API's revoke_tokens method is called.

Checklist

@n7studios n7studios self-assigned this Apr 10, 2026
@n7studios n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team April 10, 2026 09:20
@n7studios n7studios marked this pull request as ready for review April 10, 2026 09:20
Revoke and Remove Tokens on Uninstall
@n7studios n7studios merged commit d512162 into main Apr 13, 2026
@n7studios n7studios deleted the revoke-remove-tokens-disconnect branch April 23, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants