1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-09 11:08:19 +00:00

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

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.

Fix a TODO in #24821

Replace  #21851

Close #7633 , close #13606
This commit is contained in:
wxiaoguang
2024-12-02 02:03:15 +08:00
committed by GitHub
parent 1bb1a51f47
commit def13ece7c
7 changed files with 73 additions and 48 deletions

View File

@@ -48,7 +48,10 @@
</div>
{{end}}
{{template "user/auth/oauth_container" .}}
{{if and .OAuth2Providers .EnableOpenIDSignIn}}
<div class="divider divider-text">{{ctx.Locale.Tr "sign_in_or"}}</div>
{{template "user/auth/oauth_container" .}}
{{end}}
</form>
</div>
</div>