Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
661064a3 feat: ENG-12261 add OAuth 2.0 support and settings UI for Phrase integration (#4699)
## Description
Adds OAuth 2.0 support and settings UI for Phrase integration
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes authentication and how Phrase API calls are authorized (OAuth
popup, session state, 401 refresh), which can break translation
workflows if server OAuth endpoints or token refresh behave differently
than password auth.
>
> **Overview**
> Adds **SSO / OAuth 2.0** as an alternative to username/password for
the Phrase connector, aimed at orgs that block password login. Settings
gain an **Authentication** dropdown, per-org **OAuth Client ID**, US
data-center flag, and a custom **Connect / Disconnect** panel that runs
the Builder API OAuth popup flow (`prepare` → `start` → `postMessage`);
tokens stay server-side and the browser only sees connection metadata.
>
> Translation actions now go through a new **`PhraseApi`** wrapper that
checks credentials (`ensureAuthenticated`), retries on **401** via
**`oauth/refresh`** in OAuth mode, and handles org switches and stale
in-memory OAuth state with **apiKey-scoped session markers**.
Username/password fields are shown only when not in OAuth mode; both
credential types can coexist when switching modes.
>
> The README documents OAuth setup (Phrase registered app, redirect URI,
admin connect steps) and a sequence diagram. Plugin version bumps to
**0.0.17**. The stub **Request an updated translation** content action
is removed; pending-job **outdated source** warnings are refactored into
`checkTranslationFreshness`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5e0c959ba6cf03cb165653deb827b7723332a959. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->