anomalyco / anomalyco/opencode

OAuth login shows an error screen when you cancel or deny oAuth sign-in

Open
#47,590 1 comment 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Sep 6, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

The problem

When you try to sign in with GitHub or Google and then change your mind (cancel or deny), you don't go back to the login page. Instead you see an error json response "No authorization code found" and the page returns a 500 error.

That's confusing, because cancelling is a totally normal thing to do. It shouldn't look like something broke.

What should happen
  • If the user cancels/denies, send them back to the auth page like nothing went wrong.
  • If there's a different OAuth error, show a clear error message.
  • If there's no code and no error, show a clear error message too.
  • Don't dump the full callback URL/query params into the error response, because those can contain sensitive stuff like authorization codes.
Plugins

No response

OpenCode version

1.18.29

Steps to reproduce
  1. Go to the login/sign-in page.
  2. Click Sign in with GitHub (or Google).
  3. On the provider's page, click Cancel (or deny the request).
  4. You'll be sent back to opencode — but instead of the login page, you'll see an error like "No authorization code found" and a 500 error.
Screenshot and/or share link
Image
Operating System

Fedora

Terminal

Ghossty

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.