Skip to content

Add index on RefreshToken entity for valid field (main) - #69

Merged
fre5h merged 7 commits into
mainfrom
refresh-token-valid-main
Aug 21, 2026
Merged

fre5h merged 7 commits into
mainfrom
refresh-token-valid-main

Conversation

@metalslave

Copy link
Copy Markdown
Collaborator

What

  • Add RefreshTokenRepository with invalidTokensCount, deleteInvalid, findInvalid methods.
  • Add stfalcon-api-bundle:jwt:clear-refresh-token console command to remove expired/invalid refresh tokens, with two modes:
    • batched SQL delete (--sql-delete)
    • batched entity removal via Doctrine (default), both paginated via --batch-size (default 500)
  • Add index on RefreshToken entity for valid to speed up the invalid-tokens lookup query.

Testing

  • Unit tests for the command (batch pagination, lock behavior, sql-delete vs entity-remove modes).

Notes

  • Requires running the Doctrine migration for the new index before deploying (bin/console doctrine:migrations:migrate).

Andrii Tomchyshyn added 3 commits August 21, 2026 13:55
Add clear invalid token command with pagination.
Add valid index for refreshToken entity.
Add clear invalid token command with pagination.
Add valid index for refreshToken entity.
Add clear invalid token command with pagination.
Add valid index for refreshToken entity.
@metalslave
metalslave requested a review from fre5h as a code owner August 21, 2026 10:58
@fre5h
fre5h merged commit 7567594 into main Aug 21, 2026
9 checks passed
@fre5h
fre5h deleted the refresh-token-valid-main branch August 21, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants