Auth
glib authenticates with GitHub using OAuth Device Flow so sign-in works cleanly from terminal UIs.
Default requested scope is repo to support private repository access.
Client ID resolution
Section titled “Client ID resolution”glib resolves client ID in this order:
GLIB_GITHUB_CLIENT_IDenv override- built-in release default
Token storage
Section titled “Token storage”- Token path:
<user-config-dir>/glib/github_token - Token is reused on startup until invalid/expired/cleared.
Auth states
Section titled “Auth states”SIGNED_OUT -> PENDING -> AUTHORIZED (or EXPIRED)
Controls
Section titled “Controls”enterstarts sign-in from PROJECTS mode.lclears local token and returns to signed-out behavior.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| Device flow expires | Browser step not finished in time | Restart sign-in and complete quickly |
| Missing private repos | Scope/token mismatch | Re-auth and verify repo scope |
| Polling errors | Network or API throttling | Retry auth and check connectivity |