Skip to content

Conversation

@fredrikekelund
Copy link
Contributor

Related issues

Proposed Changes

This PR is based on @youknowriad's work in #1958. It implements a studio auth logout command that:

  1. Calls a REST API endpoint to revoke the access token
  2. Clears the access token from the appdata file

Testing Instructions

  1. Open Studio
  2. Ensure you are logged out
  3. Run npm run cli:build
  4. Run node dist/cli/main.js auth logout
  5. Ensure that an "Already logged out" message is printed
  6. Log in to WordPress.com through Studio
  7. Run node dist/cli/main.js auth logout
  8. Ensure that a "Successfully logged out" message is printed
  9. Reload Studio
  10. Ensure that you are logged out in Studio, too

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested review from a team and bcotrim November 6, 2025 12:03
@fredrikekelund fredrikekelund self-assigned this Nov 6, 2025
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

📊 Performance Test Results

Comparing 9a1327a vs trunk

site-editor

Metric trunk 9a1327a Diff Change
load 11735.00 ms 8604.00 ms -3131.00 ms 🟢 -26.7%

site-startup

Metric trunk 9a1327a Diff Change
siteCreation 12044.00 ms 12097.00 ms +53.00 ms 🔴 0.4%
siteStartup 3976.00 ms 3947.00 ms -29.00 ms 🟢 -0.7%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fredrikekelund, this looks good to me and works well. 👍

The command's output is as described:

Logged in Logged out
Image Image

When switching back to Studio, I'm also logged out:

Image

The new tests are also all green:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants