mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-21 08:05:21 +01:00
def13ece7c
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
25 lines
1.1 KiB
Handlebars
25 lines
1.1 KiB
Handlebars
<div id="oauth2-login-navigator" class="tw-py-1">
|
|
<div class="tw-flex tw-flex-col tw-justify-center">
|
|
<div id="oauth2-login-navigator-inner" class="tw-flex tw-flex-col tw-flex-wrap tw-items-center tw-gap-2">
|
|
{{range $provider := .OAuth2Providers}}
|
|
<a class="{{$provider.Name}} ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}">
|
|
{{$provider.IconHTML 28}}
|
|
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}}
|
|
</a>
|
|
{{end}}
|
|
{{if .EnableOpenIDSignIn}}
|
|
<a class="openid ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" href="{{AppSubUrl}}/user/login/openid">
|
|
{{svg "fontawesome-openid" 28 "tw-mr-2"}}
|
|
{{ctx.Locale.Tr "sign_in_with_provider" "OpenID"}}
|
|
</a>
|
|
{{end}}
|
|
{{if .EnableSSPI}}
|
|
<a class="ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1">
|
|
{{svg "fontawesome-windows"}}
|
|
SSPI
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|