Skip to content
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

Allow to disable the password-based login (sign-in) form #32687

Merged
merged 4 commits into from
Dec 1, 2024

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Dec 1, 2024

Usually enterprise/organization users would like to only allow OAuth2 login.

This PR adds a new config option to disable the password-based login form. It is a simple and clear approach and won't block the future login-system refactoring works.

https://gitea.com/gitea/docs/pulls/110

Fix a TODO in #24821

Replace #21851

Close #7633 , close #13606

Screenshots:

image

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 1, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 1, 2024
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files docs-update-needed The document needs to be updated synchronously labels Dec 1, 2024
@wxiaoguang wxiaoguang force-pushed the supprt-enable-password-form branch from cbaad1d to 86dd4ac Compare December 1, 2024 16:29
@nrdev88
Copy link

nrdev88 commented Dec 1, 2024

This is perfect! Can’t wait because this is basicly a security measure as well. Thanks :-)

@wxiaoguang wxiaoguang added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Dec 1, 2024
@wxiaoguang wxiaoguang added this to the 1.23.0 milestone Dec 1, 2024
routers/web/auth/auth.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 1, 2024
@wxiaoguang wxiaoguang changed the title Allow to disable the password-based login form Allow to disable the password-based login (sign-in) form Dec 1, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 1, 2024
@wxiaoguang wxiaoguang merged commit def13ec into go-gitea:main Dec 1, 2024
26 checks passed
@wxiaoguang wxiaoguang deleted the supprt-enable-password-form branch December 1, 2024 18:03
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 2, 2024
* giteaofficial/main:
  Refactor RepoBranchTagSelector (go-gitea#32681)
  Allow to disable the password-based login (sign-in) form (go-gitea#32687)
  Fix JS error when reply comment on Conversation page (go-gitea#32685)
  fix(go-gitea#32667): 🐛 Fixe a keystring misuse and refactor duplicates keystrings (go-gitea#32668)
@wxiaoguang
Copy link
Contributor Author

Need to fix a regression: Fix oauth2 login methods #32698

lunny pushed a commit that referenced this pull request Dec 3, 2024
Regression of #32687

It should use "or" but not "and", otherwise the oauth2 methods won't
show when no ENABLE_OPENID_SIGNIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-update-needed The document needs to be updated synchronously lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to disable local login Is it possible to choose default auth source?
5 participants