8 Commits

Author SHA1 Message Date
Will Sather
be582e90c3
fix: disconnected github dialog and failed connection info (#847)
* fix: disconnected github dialog and failed connection info

* fix: lint

* fix: tests
2026-04-22 20:22:06 -07:00
Will Sather
cee13abfaa
feat: replace manual oauth with better-auth (#820)
* feat: replace manual oauth with better-auth

* fix: lint

* chore: refactor accounts to unify github + vercel

* feat: enhance auth config with host allowlisting

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

* fix: add newline at end of manifest.json

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

* fix: update betterAuth database schema mappings

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

* fix: sanitize redirects and preserve destination in github flow

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

* feat: enhance GitHub app callback with installation sync tracking

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

* build: add BETTER_AUTH_SECRET to turbo env

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

* refactor: update sign-in callback to skip onboarding

Co-Authored-By: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>

---------

Co-authored-by: nicoalbanese <49612682+nicoalbanese@users.noreply.github.com>
Co-authored-by: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>
2026-04-20 15:40:13 +01:00
Will Sather
d221c58c2d
fix: remove sensitive data from error logs (#740)
Co-authored-by: open-agents-bot[bot] <260704009+open-agents-bot[bot]@users.noreply.github.com>
2026-04-14 11:38:50 +02:00
open-agents-bot[bot]
66aa7e5032
fix: unstable_cache on github api (#716)
* refactor: remove cached-api in favor of direct fetch functions

* fix: update auto-pr test mocks for cached-api removal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: willsather <56037657+willsather@users.noreply.github.com>
Co-authored-by: willsather <will@sather.ws>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 21:19:57 +01:00
open-agents-bot[bot]
d430e52b91
fix: improve GitHub connected accounts loading and UI components (#693)
* fix: handle expired tokens in GitHub connected accounts

* fix: use GitHub orgs API instead of memberships for org list

* fix: add debug logging for GitHub API errors in install-status

* fix: improve GitHub connected accounts UI and avatar handling

* fix: improve connected accounts loading and UI components

* style: format code for improved readability

---------

Co-authored-by: willsather <56037657+willsather@users.noreply.github.com>
2026-04-10 16:58:59 +00:00
openharness[bot]
bd35727d16
fix: resolve manage repo access 404 by using app slug (#326)
Co-authored-by: nicoalbanese <49612682+nicoalbanese@users.noreply.github.com>
2026-03-02 14:26:12 +00:00
Nico Albanese
a6177acd41
feat: unified GitHub App install + OAuth flow with per-org install UI (#165)
* feat: unified GitHub App install + OAuth flow with per-org install UI

Replaces the two-step OAuth-then-install flow with a single GitHub App
installation flow that handles OAuth authorization inline (via GitHub's
'Request user authorization during installation' setting).

- Add app callback OAuth code exchange so install + account link happen
  in one redirect
- Use /installations/select_target URL to always show the account/org
  picker (fixes redirect to existing personal install settings)
- Add per-org install via target_id for direct org install links
- Add /api/github/orgs/install-status endpoint returning per-org
  install state with GitHub IDs
- Rebuild accounts settings page with per-org status rows, install/
  configure actions, request-access guidance, and post-return toasts
- Delete the separate OAuth link routes (no longer needed)
- Add sonner for toast notifications
- Update repo-selector-compact wording to 'Install to organization'
- Document GitHub App setup requirements (public app, OAuth during
  install, callback URL) in .env.example and AGENTS.md

* Fix GitHub app callback auth and installation sync pagination

* Fix GitHub reconnect after disconnect skipping install page

After disconnecting GitHub, the app only revoked the OAuth token but the
GitHub App installation remained. Clicking Connect again sent users to
the install page which redirected to existing installation settings
instead of re-authorizing.

Use a github_reconnect cookie set during disconnect to route reconnects
through the OAuth authorize URL, re-linking the account and syncing
existing installations without requiring a fresh app install.

* Fix installation upsert conflict and initial repo push token

* Fix repo creation to use installation tokens and add owner picker

Use installation tokens for org repo creation (createInOrg) and user
OAuth tokens for personal accounts. Add account/org picker to the
create repo dialog so users select where to create the repository.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix repo creation push token and missing installation handling

Return an error when the requested owner has no GitHub App installation
instead of silently falling back to the user's personal account. Use
installation token for push only on org repos — personal accounts use
the OAuth token that created the repo to avoid permission gaps when the
installation has "selected repositories" access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 20:43:44 +01:00
Nico Albanese
0d28d0105a
Add GitHub authentication and repository management (#63)
* Add GitHub OAuth authentication routes

* Add GitHub API endpoints for repos and user data

* Add session and crypto utilities

* Add database schema and client setup

* Add database migrations

* Add GitHub utility functions and client

* Add authentication components and hooks

* Add repo info to chat context

* Add GitHub token to sandbox API

* Pass GitHub token to chat sandbox

* Integrate repo selection and display in chat

* Add dependencies for auth and database

* Add branch selector API endpoint

* Create branch selector component

* Add UI component library base components

* Add cmdk and popover dependencies

* Replace input field with branch selector component

* update repo selector to be combo box

* fix scroll gutter bg

* update branch selector component width

* remove storage and update todos

* fix cc comments

* add caching

* cc fixes
2026-01-11 18:32:06 +00:00