Skip to content

Unable to authenticate ChatGPT with OpenCode web when it's being reverse proxied #8798

@chriswiggins

Description

@chriswiggins

Description

If you reverse proxy OpenCode web (in our case, we're running OpenCode insider a coder workspace), then ChatGPT OAuth doesn't work, because the OAuth server callback is started on another port.

I've made the changes necessary (in my local environment) to make this work, however it looks like this may be a bit more difficult given the OAuth client ID likely has its redirect URL locked down to http://localhost:1455/auth/callback

It would be great to get some more info on this, and whether or not there is a potential other flow we can use (device code?) to get this to work in OpenCode web!

Plugins

N/A

OpenCode version

dev branch

Steps to reproduce

Try to send a different redirectUri to the ChatGPT OAuth endpoint and note the following error

Image

Screenshot and/or share link

No response

Operating System

macOS 15.4.1

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions