Skip to content

feat(auth): show provider account identity after /connect#18128

Open
coygeek wants to merge 1 commit intoanomalyco:devfrom
coygeek:feat/provider-identity-visibility
Open

feat(auth): show provider account identity after /connect#18128
coygeek wants to merge 1 commit intoanomalyco:devfrom
coygeek:feat/provider-identity-visibility

Conversation

@coygeek
Copy link

@coygeek coygeek commented Mar 18, 2026

Issue for this PR

Closes #18125

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

After /connect completes, there's no way to see which account was authenticated. With multiple accounts on the same provider, you're flying blind.

This adds optional email to the plugin AuthOauthResult callback return type. Providers can now return identity info after successful OAuth. The Copilot plugin uses this to fetch the GitHub username via /user (best-effort, wrapped in try/catch so it can't break auth).

A new GET /auth/identity endpoint returns a {providerID: email} map from stored auth data (credentials are never exposed). The settings providers list and the connect success toast use this to show which account is connected.

8 files, +83/-2 across 4 packages (plugin, opencode, app).

How did you verify your code works?

  • bun turbo typecheck passes all 13 packages (ran locally + CI confirms)
  • Unit tests pass on Linux and Windows
  • The 3 e2e failures are pre-existing flaky tests unrelated to auth (workspaces, multiline prompt, session model persistence)

Screenshots / recordings

No screenshots — identity display is a text label next to existing provider entries.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add email/username visibility for connected providers. After /connect
completes, users can now see which account was used.

Changes:
- Extend plugin AuthOauthResult to carry optional email
- Store email in auth.json alongside OAuth credentials
- Copilot plugin fetches GitHub user identity after auth
- New GET /auth/identity endpoint returns provider-to-email map
- Settings providers list shows account email inline
- Connect dialog toast includes account identity

Closes anomalyco#18125
@coygeek coygeek requested a review from adamdotdevin as a code owner March 18, 2026 19:30
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 18, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]: Show which account is connected after /connect

1 participant