drf-social-oauth2 icon indicating copy to clipboard operation
drf-social-oauth2 copied to clipboard

Deleting old tokens

Open samul-1 opened this issue 3 years ago • 1 comments

I find old, expired access tokens piling up pretty fast in my application, which takes up unnecessary database space.

I believe this package could use being shipped with a task to delete expired tokens. It could be run with celery beat or something else to periodically clean the table.

Would this make sense? If so, I'd be happy to work on a solution myself and possibly pull request here.

samul-1 avatar Jun 18 '22 09:06 samul-1

Hi @samul-1,

Thank you for your suggestions. Your suggestion is a great idea. I would really appreciate if you could do it. But it needs to be a full-fledged solution. For example, I would encourage celery, celery-beat and the broker (redis or rabbitmq) to be used in containers. Furthermore, it needs to offer a condition to the developers in case the opt-out of using the periodic task to remove the tokens. I mean, some people might not just be comfortable with the idea of including other layers of software (beat, celery, rabbit etc) just to get tokens removed.

Let me know what you think.

wagnerdelima avatar Jun 20 '22 08:06 wagnerdelima