diff --git a/options.go b/options.go index bcf7d29..99e0ef4 100644 --- a/options.go +++ b/options.go @@ -103,6 +103,9 @@ func (o *Options) Validate() error { if o.ClientSecret == "" { msgs = append(msgs, "missing setting: client-secret") } + if o.AuthenticatedEmailsFile == "" && len(o.EmailDomains) == 0 && o.HtpasswdFile == "" { + msgs = append(msgs, "missing setting for email validation: email-domain or authenticated-emails-file required.\n use email-domain=* to authorize all email addresses") + } o.redirectUrl, msgs = parseUrl(o.RedirectUrl, "redirect", msgs)