Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Fix cleaning of expired tokens - #59

Open
m-ober wants to merge 1 commit into
gbirke:masterfrom
m-ober:fix-clean-expired-tokens
Open

Fix cleaning of expired tokens#59
m-ober wants to merge 1 commit into
gbirke:masterfrom
m-ober:fix-clean-expired-tokens

Conversation

@m-ober

@m-ober m-ober commented Nov 3, 2022

Copy link
Copy Markdown
Contributor

The column $expiresColumn stores the expiry timestamp, which is calculated like: $expire = time() + $this->expireTime.

OTOH, the code to clean the expired tokens looks like this:

if ($this->cleanExpiredTokensOnLogin) {
    $this->storage->cleanExpiredTokens(time() - $this->expireTime);
}

This leads to the tokens being valid for twice the expireTime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant