mirror of https://github.com/dexidp/dex.git
Browse Source
Fetch user teams once instead of per-org to prevent OAuth timeout. Current implementation calls teamsForOrg() inside the org loop, fetching ALL user teams repeatedly for each configured org. This causes redundant API calls and OAuth code expiration for users in many teams. Example: 10 orgs, user in 150 teams - Before: 10 × 5 pages = 50 API calls, 50s - After: 1 × 5 pages = 5 API calls, 5s Changed to call userOrgTeams() once before the loop, then use cached results. The function already returns teams organized by org, making this a simple and obvious optimization.pull/4632/head
1 changed files with 11 additions and 4 deletions
Loading…
Reference in new issue