feat(cli): browser device login for shelve login - #756
Conversation
Replace manual API token paste with RFC 8628 device flow by default. Auto-provisions a revocable CLI token after browser approval, with CLI-specific login/authorize UX and docs. Keeps SHELVE_TOKEN and --token for CI.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 2 minutes and 48 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (27)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for following the naming conventions! 🙏 |
commit: |
Summary
shelve loginopens the browser, user signs in and approves, CLI receives a revocable API token (90-day, read/write).cli_device_authtable,/api/auth/device/*routes, auto token creation with auditsource: cli-device-flow./cli/authorizepage plus CLI-aware copy on/loginwhenredirecttargets the device flow (no redundant alert banners).DeviceAuthService, flags--no-browserand--with-token;SHELVE_TOKEN/--tokenunchanged for CI.@shelve/cli+@shelve/appminor), unit tests for redirect parsing and device code hashing.Test plan
pnpm db:migrateon a fresh/local app DBpnpm dev+unset SHELVE_TOKEN+SHELVE_URL=http://localhost:3000 pnpm cli login/user/tokensasCLI — {hostname}pnpm cli login --with-tokenandSHELVE_TOKEN=… pnpm cli login --tokenstill workpnpm exec vitest run test/unit/cli-authorize-redirect.test.ts test/unit/cli-device-auth.test.tsinapps/shelve