Skip to content

[13.x] Remove redundant auth code columns #1752

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

Conversation

hafezdivandari
Copy link
Contributor

@hafezdivandari hafezdivandari commented May 30, 2024

We are unnecessarily persisting scopes, client_id, and user_id to oauth_auth_codes table. These values are encrypted on the auth code itself and we have absolutely no usage for them.

Why?

  • Updating these values doesn't have any affect on the auth code, e.g. if one changes the scopes value, the auth consent form doesn't change, because the real scopes are decrypted from the code itself not from DB.
  • The code is useless if the associated client or user have been deleted, so there is no need to manually delete them by user_id or client_id. Auth codes are short-lived (always 10 mins) and will be expired and purged from DB after that.
  • There is no usage for them, completely redundant. We just store them on DB and never retrieve these values.

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 June 15, 2024 20:08
@taylorotwell
Copy link
Member

Let's just leave it. Otherwise it's a pointless breaking change.

@hafezdivandari hafezdivandari deleted the 13.x-redundant-auth-code-columns branch July 5, 2024 10:59
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