Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: allow orgs with default github provider#16755

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugodutka merged 1 commit intomainfromhugodutka/github-oauth2-default-orgs-fix
Mar 3, 2025

Conversation

hugodutka
Copy link
Contributor

This PR fixes 2 bugs:

Problem 1

The server would fail to start when the default github provider was configured and the flag--oauth2-github-allowed-orgs was set. The error was

error: configure github oauth2: allow everyone and allowed orgs cannot be used together

This PR fixes it by enabling "allow everone" with the default provider only if "allowed orgs" isn't set.

Problem 2

The default github provider uses the device flow to authorize users, and that's handled differently by our web UI than the standard oauth flow. In particular, the web UI only handles JSON responses rather than HTTP redirects. There were 2 code paths that returned redirects, and the PR changes them to return JSON messages instead if the device flow is configured.

Emyrk reacted with thumbs up emoji
@hugodutkahugodutka changed the titlefix: allowed orgs with default github providerfix: allow orgs with default github providerFeb 28, 2025
@hugodutkahugodutka marked this pull request as ready for reviewFebruary 28, 2025 14:49
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The change looks reasonable to me, but cc'ing@Emyrk for a second pair of eyes.

@johnstcnjohnstcn requested review fromEmyrk and removed request fordannykoppingMarch 3, 2025 12:51
Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Before this change, if neitherallowEveryone orallowOrgs was set, did we implicitly allow anyone?

@hugodutka
Copy link
ContributorAuthor

@Emyrk we setallowEveryone to true by default, so we implicitly allowed everyone.

Emyrk reacted with thumbs up emoji

@hugodutkahugodutka merged commit95347b2 intomainMar 3, 2025
36 checks passed
@hugodutkahugodutka deleted the hugodutka/github-oauth2-default-orgs-fix branchMarch 3, 2025 15:05
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 3, 2025
@stirby
Copy link
Collaborator

/cherry-pick release/2.20

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@EmyrkEmyrkEmyrk approved these changes

Assignees

@hugodutkahugodutka

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@hugodutka@stirby@johnstcn@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp