Skip to content

feat(auth): add press 'c' to copy URL during login flow#58

Merged
betegon merged 2 commits intomainfrom
feat/auth-login-copy-url
Jan 23, 2026
Merged

feat(auth): add press 'c' to copy URL during login flow#58
betegon merged 2 commits intomainfrom
feat/auth-login-copy-url

Conversation

@betegon
Copy link
Copy Markdown
Member

@betegon betegon commented Jan 23, 2026

Summary

Adds keyboard shortcut to copy the authentication URL during OAuth device flow. When waiting for authorization, users can press 'c' to copy the URL to their clipboard.

Helps when the browser doesn't open automatically or when authenticating on a different device.

Changes

New: src/lib/clipboard.ts

Cross-platform clipboard utility using native commands:

  • macOS: pbcopy
  • Linux: xclip or xsel
  • Windows: clip

Updated: src/commands/auth/login.ts

  • Added keyboard listener during OAuth polling (TTY environments only)
  • Press 'c' to copy verification URL to clipboard
  • Shows "Copied!" feedback on success
  • Proper cleanup via finally block
  • Shows QR code as fallback when browser can't open

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 23, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Issue

  • Add workspace-scoped alias cache by BYK in #52
  • Add short ID aliases for multi-project support by BYK in #31

Other

  • (auth) Add press 'c' to copy URL during login flow by betegon in #58
  • (commands) Rename get commands to view and add -w browser flag by BYK in #53

Bug Fixes 🐛

  • (issue) Use org-scoped endpoint for latest event + enhanced display by betegon in #40

Documentation 📚

  • Update command references from 'get' to 'view' and document -w flag by BYK in #54

Internal Changes 🔧

  • (release) Fix changelog-preview permissions by BYK in #41
  • Rename config folder from .sentry-cli-next to .sentry by BYK in #50

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 23, 2026

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 1534 uncovered lines.
✅ Project coverage is 55.92%. Comparing base (base) to head (head).

Files with missing lines (18)
File Patch % Lines
human.ts 9.42% ⚠️ 731 Missing
oauth.ts 21.71% ⚠️ 202 Missing
api-client.ts 46.98% ⚠️ 123 Missing
resolver.ts 3.23% ⚠️ 120 Missing
errors.ts 5.94% ⚠️ 95 Missing
fixture.ts 28.74% ⚠️ 62 Missing
api.ts 66.30% ⚠️ 61 Missing
errors.ts 51.61% ⚠️ 60 Missing
preload.ts 39.02% ⚠️ 25 Missing
detector.ts 87.79% ⚠️ 16 Missing
cache.ts 76.27% ⚠️ 14 Missing
config.ts 97.11% ⚠️ 7 Missing
colors.ts 85.42% ⚠️ 7 Missing
index.ts 95.06% ⚠️ 4 Missing
env-file.ts 97.17% ⚠️ 3 Missing
alias.ts 96.43% ⚠️ 2 Missing
java.ts 97.22% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    55.92%    55.92%        —%
==========================================
  Files           33        33         —
  Lines         3480      3480         —
  Branches         0         0         —
==========================================
+ Hits          1946      1946         —
- Misses        1534      1534         —
- Partials         0         0         —

Generated by Codecov Action

@betegon betegon force-pushed the feat/auth-login-copy-url branch from d2832ef to c593b9a Compare January 23, 2026 19:12
@betegon betegon marked this pull request as ready for review January 23, 2026 19:14
cursor[bot]

This comment was marked as outdated.

@betegon betegon force-pushed the feat/auth-login-copy-url branch from c593b9a to 0ef11ec Compare January 23, 2026 19:30
cursor[bot]

This comment was marked as outdated.

Add clipboard utility and keyboard listener to allow users to quickly
copy the authentication URL by pressing 'c' during the OAuth device flow.
This helps when the browser doesn't open automatically.
@betegon betegon force-pushed the feat/auth-login-copy-url branch from 0ef11ec to 1e6554a Compare January 23, 2026 19:43
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@betegon betegon merged commit 9adebe6 into main Jan 23, 2026
15 checks passed
@betegon betegon deleted the feat/auth-login-copy-url branch January 23, 2026 20:32
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.

1 participant