diff --git a/models/auth.go b/models/auth.go index 67afd62..817c5d9 100644 --- a/models/auth.go +++ b/models/auth.go @@ -21,6 +21,8 @@ func (a *Auth) SetPassword(pass string) error { return nil } +const VerifiedRequired = false + func (a *Auth) Login(pass string, tfCode string) (error, bool) { if err := a.CheckPassword(pass); err != nil { return err, false @@ -30,7 +32,7 @@ func (a *Auth) Login(pass string, tfCode string) (error, bool) { return err, true } - if !a.Verified { + if !a.Verified && VerifiedRequired { return errors.New("not yet verified"), true }