diff --git a/main.go b/main.go index 73a84acd4..5cf72df95 100644 --- a/main.go +++ b/main.go @@ -86,7 +86,11 @@ func main() { oauthproxy := NewOauthProxy(upstreamUrls, *clientID, *clientSecret, validator) oauthproxy.SetRedirectUrl(redirectUrl) if len(googleAppsDomains) != 0 && *authenticatedEmailsFile == "" { - oauthproxy.SignInMessage = fmt.Sprintf("using a email address from the following domains: %v", strings.Join(googleAppsDomains, ", ")) + if len(googleAppsDomains) > 1 { + oauthproxy.SignInMessage = fmt.Sprintf("Authenticate using one of the following domains: %v", strings.Join(googleAppsDomains, ", ")) + } else { + oauthproxy.SignInMessage = fmt.Sprintf("Authenticate using %v", googleAppsDomains[0]) + } } if *htpasswdFile != "" { oauthproxy.HtpasswdFile, err = NewHtpasswdFromFile(*htpasswdFile) diff --git a/templates.go b/templates.go index a0e2a9102..7d29c404a 100644 --- a/templates.go +++ b/templates.go @@ -9,26 +9,95 @@ func getTemplates() *template.Template { t, err := template.New("foo").Parse(`{{define "sign_in.html"}} -