adamniedzielski/tiddle

Soft purge setting `revoked_at` instead of destroying auth tokens?

Closed this issue · 2 comments

I noticed that in the purge_old_tokens method that a destroy_all operation is used. My use case requires that I keep all my authorization tokens granted.

What do you think about setting a revoked_at timestamp instead of deleting the records?

@edwinthinks This is essentially what paranoia does. You could add paranoia to your authentication token model to prevent them from being lost.

@djkotowski good point! I didn't think to utilize paranoia in conjunction with this gem. That works, I'll close this ticket unless it makes sense to add the option soft delete without paranoia or some form of documentation :).