Skip to content

Commit b432e46

Browse files
aeneasrory-bot
authored andcommitted
fix: regression in UsedTimes calculation
GitOrigin-RevId: 4068e8604043f3ce0eb8f9c1f1f8e2ea49aa6725
1 parent 42b6a79 commit b432e46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

persistence/sql/persister_oauth2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func (p *Persister) GetRefreshTokenSession(ctx context.Context, signature string
477477
row.FirstUsedAt.Valid &&
478478
row.FirstUsedAt.Time.Add(graceful.Period).After(time.Now()) &&
479479
(graceful.Count == 0 || // no limit
480-
(row.UsedTimes.Valid && row.UsedTimes.Int32 < graceful.Count)) {
480+
(row.UsedTimes.Int32 < graceful.Count)) {
481481
// We return the request as is, which indicates that the token is active (because we are in the grace period still).
482482
return row.toRequest(ctx, session, p)
483483
}

0 commit comments

Comments
 (0)