Skip to content

feat: Sign in with ChatGPT #1892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

neominik
Copy link
Contributor

Adds support for signing in with ChatGPT (same as in codex) through opencode auth login. Unfortunately, I cannot test if it actually works because support for enterprise accounts is "coming soon".

If anyone with a Plus, Pro, or Team ChatGPT account could test this via bun run dev -- auth login, that would be awesome.

@wizardlyluke
Copy link

I just tried this out with my Pro account and I get a missing organization_id error.

◒  Waiting for authorizationAPI key exchange failed: 401 Unauthorized {
  "error": {
    "message": "Invalid ID token: missing organization_id",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_subject_token"
  }

@neominik
Copy link
Contributor Author

Thanks for trying! I aligned the implementation more closely with what codex does. Not sure if it will fix your issue. If not, I'll convert to draft and park this until enterprise accounts are supported unless someone else want's to give it a shot.

@wizardlyluke
Copy link

Alright I seem to get a different error now. This login works with codex so I'm guessing something else is up. I was thinking it wasn't passing the organization ID but I couldn't get it to work when doing that either, or I'm just not doing it right.
■ Login incomplete — please finish your OpenAI organization/project setup in the browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants