Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bug: CODER_OAUTH2_GITHUB_ALLOWED_ORGS breaks first login via GitHub #17752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
phorcys420 opened this issue May 9, 2025 · 0 comments
Open
1 task done
Labels
community Pull Requests and issues created by the community. need-backend Issues that need backend work needs-triage Issue that require triage onboarding-improvement s2 Broken use cases or features (with a workaround). Only humans may set this.

Comments

@phorcys420
Copy link
Member

phorcys420 commented May 9, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

2025-05-09.22-23-40.mp4

When setting CODER_OAUTH2_GITHUB_ALLOWED_ORGS on a fresh Coder deployment, the Coder deployment will try to check against the orgs list, but since the built-in Coder GitHub app does not set that permission, Coder will just think that you're not a member of the org.

(Discord Thread)

Relevant Log Output

Expected Behavior

Coder ignores CODER_OAUTH2_GITHUB_ALLOWED_ORGS, or uses the OAuth app with ID github if defined by the admin, or both.

Steps to Reproduce

  1. Set CODER_OAUTH2_GITHUB_ALLOWED_ORGS to anything
  2. Start a fresh Coder deployment
  3. Try to log in

Environment

Coder v2.21.3+bd1ef88 (not in the video but I did check and it's the same.

Additional Context

This sometimes leaves the Coder deployment in a broken state when restarted (the deployment thinks it has a user but you can't use it).

The user that reported this got a different issue, but I believe the cause to be the same.
Image

@phorcys420 phorcys420 added s2 Broken use cases or features (with a workaround). Only humans may set this. community Pull Requests and issues created by the community. need-backend Issues that need backend work onboarding-improvement needs-triage Issue that require triage labels May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Pull Requests and issues created by the community. need-backend Issues that need backend work needs-triage Issue that require triage onboarding-improvement s2 Broken use cases or features (with a workaround). Only humans may set this.
Projects
None yet
Development

No branches or pull requests

1 participant