anomalyco / anomalyco/opencode
OAuth login shows an error screen when you cancel or deny oAuth sign-in
Open
@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
- Go to the login/sign-in page.
- Click Sign in with GitHub (or Google).
- On the provider's page, click Cancel (or deny the request).
- 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
Operating System
Fedora
Terminal
Ghossty
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.