{{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} {{template "base/alert" .}} {{end}}

{{if .LinkAccountMode}} {{ctx.Locale.Tr "auth.oauth_signin_title"}} {{else}} {{ctx.Locale.Tr "auth.login_userpass"}} {{end}}

{{if .EnablePasswordSignInForm}}
{{.CsrfTokenHtml}}
{{if or (not .DisablePassword) .LinkAccountMode}}
{{ctx.Locale.Tr "auth.forgot_password"}}
{{end}} {{if not .LinkAccountMode}}
{{end}} {{template "user/auth/captcha" .}}
{{end}}{{/*if .EnablePasswordSignInForm*/}} {{/* "oauth_container" contains not only "oauth2" methods, but also "OIDC" and "SSPI" methods */}} {{$showOAuth2Methods := or .OAuth2Providers .EnableOpenIDSignIn .EnableSSPI}} {{if and $showOAuth2Methods .EnablePasswordSignInForm}}
{{ctx.Locale.Tr "sign_in_or"}}
{{end}} {{if $showOAuth2Methods}} {{template "user/auth/oauth_container" .}} {{end}}
{{if or .EnablePasskeyAuth .ShowRegistrationButton}}
{{if .EnablePasskeyAuth}} {{template "user/auth/webauthn_error" .}} {{end}} {{if .ShowRegistrationButton}}
{{ctx.Locale.Tr "auth.need_account"}} {{ctx.Locale.Tr "auth.sign_up_now"}}
{{end}}
{{end}}