Root Causes Identified
- Corrupted Local Keyring
• File-based keyring backend (~/.config/gogcli/keyring/) contains corrupted token files
• Error: aes.KeyUnwrap(): integrity check failed when attempting to decrypt stored tokens
• Clearing and recreating keyring directory doesn't resolve the issue - OAuth Token Storage Failure
• New authorization codes are generated and user authorizes in browser
• However, tokens are not being saved to keyring after authorization completes
• No token file created in keyring directory despite successful auth flow - OAuth Redirect Flow Timeout Issues
• Manual redirect URL capture (--manual flag) times out before user can paste URL
• Browser-based auth flow (gog auth add) also times out intermittently
• Authorization window closes before token can be stored - Maton Integration Not Working
• Tokens are stored in Maton (verified via dashboard: both accounts show "Active")
• gog CLI not configured to retrieve tokens from Maton
• Maton API endpoint for token retrieval unclear/undocumented
Attempted Solutions (All Failed)
• ✗ Clearing and recreating keyring files
• ✗ Switching keyring backends (file → keychain → auto)
• ✗ Re-authenticating both accounts multiple times
• ✗ Using manual authorization code flow
• ✗ Setting explicit GOG_KEYRING_PASSWORD
• ✗ Reinstalling OAuth credentials
Current Status
• Gmail/Calendar Access: ❌ Blocked
• Google Drive Access: ✅ Works (via gog drive ls)
• Maton Tokens: ✅ Active and valid in Maton dashboard
• gog CLI: ⚠️ Can't access stored tokens