mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
## OAuth (browser PKCE) - **`poll-callback`**: generalise from codex-only to all `PKCE_CALLBACK_PROVIDERS` (codex, windsurf, devin-cli); state slot is now dynamic (`__codexCallbackState` vs `__windsurfCallbackState`) - **`OAuthModal`**: replace the codex-specific callback-server block with a shared `PKCE_CALLBACK_SERVER_PROVIDERS` branch covering all three providers; same start-callback-server + poll-callback polling loop, same 2-second interval, same 5-minute timeout - **`OAuthModal` redirect URI fallback**: windsurf/devin-cli now use `http://localhost:{port}/auth/callback` (correct path) instead of the generic `/callback` on non-true-localhost - **`/auth/callback` page**: new Next.js route (`src/app/auth/callback`) that re-exports `/callback/page`; Windsurf redirects to `/auth/callback` so the popup auto-completes without manual URL paste (postMessage + BroadcastChannel + localStorage) ## API-token (WINDSURF_API_KEY / paste-token) - **`route.ts` — `import-token` action**: new POST action for `IMPORT_TOKEN_PROVIDERS` (windsurf, devin-cli); calls `provider.mapTokens({ accessToken: token })` skipping the HTTP exchange and creating the connection directly - **`oauthImportTokenSchema`**: Zod schema `{ token, connectionId? }` - **`OAuthModal` — "Paste API Key" tab**: tab-switcher UI for windsurf/devin-cli; sends `POST /import-token`; errors shown inline ## Security: remove hardcoded Firebase API key (GH secret alert) - `AIzaSyBpLTEGSt59AUPKxBb7lIWjSE2ZXQH7mgU` removed from both `oauth.ts` and `tokenRefresh.ts`; code now reads only `process.env.WINDSURF_FIREBASE_API_KEY` - Added `WINDSURF_FIREBASE_API_KEY` to `.env.example` with the public key value and an explanation that it is a client-side credential embedded in the Windsurf app (not a secret) - `tokenRefresh.ts`: graceful `return null` with warn log when key is absent (import tokens are long-lived and skip refresh anyway) ## Docs - Sync 40 i18n CHANGELOG mirrors to v3.8.0 root content Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>