laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.
https://laravel.com/docs/passport
MIT License
3.29k stars 780 forks source link

[13.x] Improve performance, fix minor bugs, and add tests #1783

Closed hafezdivandari closed 2 months ago

hafezdivandari commented 2 months ago

This PR does:

Before After
1. `select * from "oauth_clients" where "id" = '9cda...' limit 1` 1. `select * from "oauth_clients" where "id" = '9cda...' limit 1` 1. `select * from "oauth_clients" where "id" = '9cda...' limit 1` 1. `select exists(select * from "oauth_auth_codes" where "id" = '0ab0...' and "revoked" = 0) as "exists"` 1. `select * from "oauth_clients" where "id" = '9cda...' limit 1` 1. `insert into "oauth_access_tokens" ("id", "user_id", "client_id", "scopes", "revoked", "created_at", "updated_at", "expires_at") values ('36ef...', '1', '9cda...', '["create","read"]', 0, '2024-08-26 02:03:54', '2024-08-26 02:03:54', '2025-08-26 02:03:54')` 1. `insert into "oauth_refresh_tokens" ("id", "access_token_id", "revoked", "expires_at") values ('0ed5...', 0, '2025-08-26 02:03:54')` 1. `update "oauth_auth_codes" set "revoked" = 1 where "id" = '0ab0...'` 1. `select * from "oauth_clients" where "id" = '9cda...' limit 1` 1. `select exists(select * from "oauth_auth_codes" where "id" = '0ab0...' and "revoked" = 0) as "exists"` 1. `insert into "oauth_access_tokens" ("id", "user_id", "client_id", "scopes", "revoked", "created_at", "updated_at", "expires_at") values ('36ef...', '1', '9cda...', '["create","read"]', 0, '2024-08-26 02:03:54', '2024-08-26 02:03:54', '2025-08-26 02:03:54')` 1. `insert into "oauth_refresh_tokens" ("id", "access_token_id", "revoked", "expires_at") values ('0ed5...', 0, '2025-08-26 02:03:54')` 1. `update "oauth_auth_codes" set "revoked" = 1 where "id" = '0ab0...'`
github-actions[bot] commented 2 months ago

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.