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

[13.x] Fix determining revoked records #1751

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

hafezdivandari
Copy link
Contributor

This PR fixes how we determine if the specified record is revoked and adds integration tests for this.

Auth Code

If the given auth code does not exist (removed), Bridge/AuthCodeRepository::isAuthCodeRevoked() returns false mistakenly.

Access Token

TokenRepository::isAccessTokenRevoked() is using find to determine if the given access token is revoked, this causes performance issue as TokenGaurd calls find twice on every request.

Refresh Token

RefreshTokenRepository::isRefreshTokenRevoked() also uses find to determine if the given refresh token is revoked.

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@driesvints
Copy link
Member

I guess this solves the long outstanding #382 issue? If that's the case then we should definitely give this a go.

@hafezdivandari hafezdivandari marked this pull request as ready for review June 4, 2024 17:05
@taylorotwell taylorotwell merged commit 38112e9 into laravel:13.x Jun 5, 2024
9 checks passed
@hafezdivandari hafezdivandari deleted the 13.x-fix-is-revoked branch June 5, 2024 14:38
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.

3 participants