Only keep valid oauth tokens alive
This commit is contained in:
parent
bf3dedf7cd
commit
1fd407681e
1 changed files with 1 additions and 1 deletions
|
|
@ -228,7 +228,7 @@ func refreshFieldseekerData(ctx context.Context, newOauthCh <-chan struct{}) {
|
|||
workerCtx, cancel := context.WithCancel(context.Background())
|
||||
var wg sync.WaitGroup
|
||||
|
||||
oauths, err := models.OauthTokens.Query().All(ctx, PGInstance.BobDB)
|
||||
oauths, err := models.OauthTokens.Query(models.SelectWhere.OauthTokens.InvalidatedAt.IsNull()).All(ctx, PGInstance.BobDB)
|
||||
if err != nil {
|
||||
slog.Error("Failed to get oauths", slog.String("err", err.Error()))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue