#18477 · @kamilio · opened Mar 21, 2026 at 1:50 AM UTC · last updated Mar 21, 2026 at 1:57 AM UTC
feat: add Poe OAuth auth plugin
Score breakdown
Impact
Clarity
Urgency
Ease Of Review
Guidelines
Readiness
Size
Trust
Traction
Summary
This PR introduces a new Poe OAuth authentication plugin, implementing both browser-based OAuth and manual API key entry. The feature includes comprehensive test coverage, detailed verification steps, and clear screenshots of the user flow. However, the substantial number of added lines presents a significant review burden.
Description
Issue for this PR
Closes #18478
Type of change
- [ ] Bug fix
- [x] New feature
- [ ] Refactor / code improvement
- [ ] Documentation
What does this PR do?
Adds Poe as a built-in auth plugin. The plugin supports two auth methods: browser-based OAuth using PKCE (opens poe.com/oauth/authorize, exchanges the authorization code for an API key via api.poe.com/token) and manual API key entry. The implementation follows the same patterns as the existing Codex auth plugin (local callback server on an ephemeral port, CSRF state validation, PKCE challenge, timeout handling).
The plugin is registered in the INTERNAL_PLUGINS list in src/plugin/index.ts alongside the existing Codex, Copilot, and GitLab plugins.
How did you verify your code works?
- 12 tests pass covering: OAuth URL construction, browser open flow, error/missing-code/invalid-state callback handling, successful token exchange, expiry calculation, expired token re-login error, plugin provider visibility, ProviderAuth registration, and end-to-end model listing + chat stream with a mock server.
bun typecheckpasses.- Full monorepo
bun turbo typecheckpasses (13/13 packages). - Manual tests performing the OAUth Flow
Screenshots / recordings
Checklist
- [x] I have tested my changes locally
- [x] I have not included unrelated changes in this PR
Linked Issues
#18478 [FEATURE]: Add Poe as a built-in auth provider
View issueComments
No comments.
Changed Files
packages/opencode/src/plugin/index.ts
+2−1packages/opencode/src/plugin/poe.ts
+422−0packages/opencode/test/plugin/poe.test.ts
+355−0