bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

authorization_codes table growing regularly #963

Closed bdegoy closed 5 years ago

bdegoy commented 5 years ago

Hi, I noticed that authorization_codes table was growing regularly. In normal situation, data is erased by AuthorizationCode::expireAuthorizationCode right after successflul token exchange. If for any reason authorization code expires before token exchange a line of data remains in table. It happens when I am in step-to-step debugging. Maybe it's not very important.

bshaffer commented 5 years ago

I have left this to the implementations, as a simple delete query will take care of this. However, if you'd like to add a function implementation such as clearAllExpiredTokens onto the storage classes, I would be happy to accept it. But in general I do not consider this as an important feature.

bdegoy commented 5 years ago

Ok, I agree. Any how you are the boss :)