canonical / canonical/testflinger
database.delete_refresh_token is not used
- Dominant language
- Python
- Stars
- 26
- Forks
- 49
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 16
Description
We should identify where in the code we ought to be deleting refresh tokens as the currently the `delete_refresh_token` function from `database` as it is not used.
Presently we are simply relying on the TTL to expire:
```
# Remove refresh tokens that haven't been accessed over 90 days
mongo.db.refresh_tokens.create_index(
"last_accessed", expireAfterSeconds=REFRESH_TOKEN_IDEL_EXPIRATION
)
```
Contributor guide
Research direction
Start by tracing uses of database.delete_refresh_token and the refresh-token lifecycle around the database TTL index shown in the issue. Identify the relevant deletion paths and verify that explicit cleanup occurs where appropriate while the 90-day TTL remains effective.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100