Device Code Authentication
DepFixer uses a device code flow for secure CLI authentication. This is the same pattern used by GitHub CLI, Vercel, and other modern developer tools.How It Works
- CLI requests code - You run
npx depfixer login - Server generates code - A unique verification code is created
- Browser opens - You’re taken to the verification page
- You authorize - Enter the code and log in
- CLI receives token - Access granted automatically
Step by Step
1. Initiate Login
2. Receive Verification Code
3. Authorize in Browser
In the browser:- Log in or create an account
- Verify the code matches
- Click “Authorize”
4. CLI Receives Token
Security Benefits
| Feature | Benefit |
|---|---|
| No password in CLI | Password never touches terminal |
| Short-lived codes | Codes expire in 15 minutes |
| User verification | User must manually approve |
| Device binding | Tokens tied to specific device |
| Revocable | Revoke access anytime from web |
Token Lifecycle
- Access Token: 1 hour lifetime, auto-refreshes
- Refresh Token: 30 days lifetime
- After 30 days: Re-login required
Manual Authorization
If the browser doesn’t open automatically:- Copy the URL from the terminal
- Paste into any browser
- Complete authorization
- Return to CLI
Troubleshooting
Code Not Recognized
The code may have expired (15 minute limit). Runnpx depfixer login again.