Account: Add auth-related error messages to pkg/authn #808 #4114

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-03-29 12:16:26 +01:00
parent 9b4a162705
commit 37c3c9d624
25 changed files with 218 additions and 164 deletions

View File

@@ -236,8 +236,8 @@ func (m *Passcode) GenerateCode() (code string, err error) {
return code, err
}
// Verify checks if the passcode provided is valid.
func (m *Passcode) Verify(code string) (valid bool, recovery bool, err error) {
// Valid checks if the passcode provided is valid.
func (m *Passcode) Valid(code string) (valid bool, recovery bool, err error) {
// Validate arguments.
if m == nil {
return false, false, errors.New("passcode is nil")