Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo committed Sep 10, 2020
1 parent 78eb58e commit c0a880a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/database/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ func (db *Database) VerifyCodeAndIssueToken(realmID uint, verCode string, accept
}

// Validation
if vc.IsExpired() {
expired, err := db.IsCodeExpired(&vc, verCode)
if err != nil {
db.logger.Errorw("failed to check code expiration", "error", err)
return ErrVerificationCodeExpired
}
if expired {
return ErrVerificationCodeExpired
}
if vc.Claimed {
Expand Down

0 comments on commit c0a880a

Please sign in to comment.