Fixes #9715: Fix SOCIAL_AUTH_PIPELINE config parameter not taking effect

This commit is contained in:
jeremystretch
2022-07-15 08:34:30 -04:00
parent 3079597e4f
commit b0bd57acde
3 changed files with 14 additions and 8 deletions

View File

@@ -476,13 +476,6 @@ if SENTRY_ENABLED:
# Django social auth
#
# Load all SOCIAL_AUTH_* settings from the user configuration
for param in dir(configuration):
if param.startswith('SOCIAL_AUTH_'):
globals()[param] = getattr(configuration, param)
SOCIAL_AUTH_JSONFIELD_ENABLED = True
SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
@@ -496,6 +489,14 @@ SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.user.user_details',
)
# Load all SOCIAL_AUTH_* settings from the user configuration
for param in dir(configuration):
if param.startswith('SOCIAL_AUTH_'):
globals()[param] = getattr(configuration, param)
# Force usage of PostgreSQL's JSONB field for extra data
SOCIAL_AUTH_JSONFIELD_ENABLED = True
#
# Django Prometheus