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] Remove redundant PAT client table and model #1749

Merged
merged 7 commits into from
Jun 4, 2024

Conversation

hafezdivandari
Copy link
Contributor

Personal access client table (oauth_personal_access_clients) and its model (Laravel\Passport\PersonalAccessClient) is redundant since Passport 9.0.

Changes

  • oauth_personal_access_clients table has been removed.
  • Laravel\Passport\PersonalAccessClient model has been removed.
  • Passport::$personalAccessClientModel property has been removed.
  • Passport::usePersonalAccessClientModel() method has been removed.
  • Passport::personalAccessClientModel() method has been removed.
  • Passport::personalAccessClient() method has been removed.

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.

@hafezdivandari hafezdivandari marked this pull request as ready for review May 30, 2024 15:58
@taylorotwell
Copy link
Member

Can you explain a bit more why it is redundant?

@hafezdivandari
Copy link
Contributor Author

hafezdivandari commented May 30, 2024

@taylorotwell sure. Since Passport 9.0, according to docs PASSPORT_PERSONAL_ACCESS_CLIENT_ID and PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET env variables should be set to be able to issue new personal access tokens. Since then, we are using these 2 values to issue a new PAT.

But before that change on 9.x, we were finding the first active personal access client on oauth_personal_access_clients, and using the found client to issue a new PAT, that's why we were copying any new personal access clients from oauth_clients to oauth_personal_access_clients. We have no usage for oauth_personal_access_clients and its model anymore.

@taylorotwell taylorotwell merged commit 57931ae into laravel:13.x Jun 4, 2024
9 checks passed
@hafezdivandari hafezdivandari deleted the 13.x-remove-pat-table branch June 4, 2024 16:24
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.

2 participants