-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Description
When trying to connect ChatGPT Plus subscription via OAuth in OpenCode, the browser authentication succeeds and redirects to http://localhost:1455/auth/callback?code=...&state=..., but OpenCode fails to save the credentials. The log shows Token exchange failed: 403 failed. After restarting OpenCode, no OpenAI models appear in the model list.
Additional Context
- Browser shows successful redirect to http://localhost:1455/auth/callback?code=...
- OAuth server on port 1455 is running correctly
- The issue persists even with proxy completely disabled (unset ALL_PROXY)
- auth.json only contains other providers (zenmux, opencode, streamlake, google) but no OpenAI entry
Plugins
No response
OpenCode version
1.2.10
Steps to reproduce
- Run /connect in OpenCode TUI
- Select OpenAI provider
- Select ChatGPT Plus/Pro option
- Complete browser authentication (login succeeds, redirect to localhost callback URL)
- OpenCode shows no success message, no "✓ Login successful" popup
- Check ~/.local/share/opencode/auth.json - no OpenAI credentials saved
- Restart OpenCode, run /models - no OpenAI models available
Screenshot and/or share link
No response
Operating System
macOS
Terminal
Terminal
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)