Skip to content

Switch staging back to builtin oauth Application #2331

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

Merged
merged 1 commit into from
Apr 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions dandiapi/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ def mutate_configuration(configuration: type[ComposedConfiguration]):
AUTO_APPROVE_USERS = False


# NOTE: The staging configuration uses a custom OAuth toolkit `Application` model
# (`StagingApplication`) to allow for wildcards in OAuth redirect URIs (to support Netlify branch
# deploy previews, etc). Note that both the custom `StagingApplication` and default
# `oauth2_provider.models.Application` will have Django database models and will show up on the
# Django admin, but only one of them will be in active use depending on the environment
# the API server is running in (production/local or staging).
class HerokuStagingConfiguration(HerokuProductionConfiguration):
OAUTH2_PROVIDER_APPLICATION_MODEL = 'api.StagingApplication'
# The staging configuration enables wildcards in OAuth redirect URIs in order
# to support Netlify deploy previews.
ALLOW_URI_WILDCARDS = True