Skip to content

Conversation

@jacobwgillespie
Copy link
Member

Add verbose authentication debugging and a troubleshooting guide for "Invalid token" errors.

The depot projects list command's token resolution prioritizes OIDC tokens over the config file token, unlike depot org list. This can lead to "Invalid token" errors when stale OIDC environment variables are present. These changes provide tools and documentation to identify and resolve such conflicts, and also refactor RetrieveOrganizations to use the new debug logging.


Open in Cursor Open in Web

- Add DEPOT_DEBUG_AUTH environment variable for verbose auth logging
- Add token masking for safe debug output
- Update resolveOIDCToken and resolveJITToken to use consistent debug logging
- Add RetrieveOrganizationsWithToken for explicit token passing
- Add TROUBLESHOOTING-AUTH.md explaining the difference between
  org list (uses config.GetApiToken directly) and projects list
  (uses ResolveProjectAuth which includes OIDC providers)

This helps diagnose issues where depot org list works but depot projects
list returns 'Invalid token' errors due to OIDC token interference.

Co-authored-by: jacob <jacob@depot.dev>
@cursor
Copy link

cursor bot commented Jan 20, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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.

3 participants