File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -201,9 +201,11 @@ def mutate_configuration(configuration: type[ComposedConfiguration]):
201
201
AUTO_APPROVE_USERS = False
202
202
203
203
204
+ # NOTE: The staging configuration uses a custom OAuth toolkit `Application` model
205
+ # (`StagingApplication`) to allow for wildcards in OAuth redirect URIs (to support Netlify branch
206
+ # deploy previews, etc). Note that both the custom `StagingApplication` and default
207
+ # `oauth2_provider.models.Application` will have Django database models and will show up on the
208
+ # Django admin, but only one of them will be in active use depending on the environment
209
+ # the API server is running in (production/local or staging).
204
210
class HerokuStagingConfiguration (HerokuProductionConfiguration ):
205
- @staticmethod
206
- def mutate_configuration (configuration : type [ComposedConfiguration ]):
207
- # The staging configuration enables wildcards in OAuth redirect URIs in order
208
- # to support Netlify deploy previews.
209
- configuration .OAUTH2_PROVIDER ['ALLOW_URI_WILDCARDS' ] = True
211
+ OAUTH2_PROVIDER_APPLICATION_MODEL = 'api.StagingApplication'
You can’t perform that action at this time.
0 commit comments