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

Refactor(oauth): resolve RuntimeWarning #2152

Merged
merged 5 commits into from
Jun 12, 2024

Commits on Jun 12, 2024

  1. refactor(oauth): move client registration to happen during view import

    this way we avoid reading from the database during any AppConfig.ready
    implementations, which Django warns us about because they are executed
    as a part of management commands as well.
    angela-tran committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    b4e9f44 View commit details
    Browse the repository at this point in the history
  2. refactor(oauth): change to approach of registering client in login view

    the register method seems to be idempotent, so it's fine to call it like
    this. the approach of registering during view import made importing the
    module complicated (e.g. when importing from the module for our tests)
    angela-tran committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    c9e7494 View commit details
    Browse the repository at this point in the history
  3. feat: ensure client is registered for authorize view

    currently the only way to get to the authorize view is from the login
    view, so the client should already be registered. But it doesn't hurt
    to call it here either.
    angela-tran committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    770f8e1 View commit details
    Browse the repository at this point in the history
  4. refactor(oauth): attempt to create client and register if needed

    taking this approach in hopes of it being a more readable solution.
    angela-tran committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    4d2e1ec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    06186fa View commit details
    Browse the repository at this point in the history