Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cleaning of expired tokens #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-ober
Copy link
Contributor

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

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 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.

1 participant