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

Prune expires_at tokens #385

Merged
merged 5 commits into from Jul 29, 2022
Merged

Prune expires_at tokens #385

merged 5 commits into from Jul 29, 2022

Conversation

iruoy
Copy link
Contributor

@iruoy iruoy commented Jul 28, 2022

Closes #384

This still requires the sanctum.expiration to be set.

@driesvints
Copy link
Member

driesvints commented Jul 29, 2022

Actually I was thinking that we might be able to do this without requiring sanctum.expiration to be set? Maybe we should always allow pruning by expired_at and if sanctum.expiration is set additionally prune by created_at?

@iruoy
Copy link
Contributor Author

iruoy commented Jul 29, 2022

That is how I envisioned it before looking at the code. However I didn't want to make the change before getting some feedback. I'll look into it later today.

@iruoy
Copy link
Contributor Author

iruoy commented Jul 29, 2022

I've pushed some changes. Tokens with expired_at will now always be pruned and I've used the new artisan task() component.

I've kept the warn() component for now, but I think it should be removed.

@taylorotwell taylorotwell merged commit 3eaf74a into laravel:3.x Jul 29, 2022
@iruoy iruoy deleted the feature/prune-expires_at-tokens branch July 29, 2022 17:45
@driesvints
Copy link
Member

@iruoy you're sure that tokens without an expired_at timestamp won't be deleted, right?

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.

Prune command doesn't take expires_at into account
3 participants