Skip to content

Commit

Permalink
Add social auth, fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
drien committed Jul 8, 2024
1 parent b40117e commit d705db3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 13 additions & 1 deletion app/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"celery",
"django_celery_beat",
"webpack_loader",
"django_social",
"django_otp",
"django_otp.plugins.otp_static",
"django_otp.plugins.otp_totp",
"two_factor",
# 'two_factor.plugins.yubikey', TODO: Enable this
]

MIDDLEWARE = [
Expand Down Expand Up @@ -167,3 +167,15 @@
},
},
}

SOCIAL_AUTH_PIPELINE = (
'social_core.pipeline.social_auth.social_details',
'social_core.pipeline.social_auth.social_uid',
'social_core.pipeline.social_auth.social_user',
'social_core.pipeline.user.get_username',
'social_core.pipeline.social_auth.associate_by_email',
'social_core.pipeline.user.create_user',
'social_core.pipeline.social_auth.associate_user',
'social_core.pipeline.social_auth.load_extra_data',
'social_core.pipeline.user.user_details',
)
2 changes: 1 addition & 1 deletion app/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DATABASES["default"] = dj_database_url.config(conn_max_age=600, ssl_require=True)

ENVIRONMENT = "stg"
ENVIRONMENT = "prd"

SECRET_KEY = os.environ["SECRET_KEY"]

Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module.exports = {
},
resolve: {
alias: {'@frontend': path.resolve(__dirname, 'frontend/')},
fallback: { "url": require.resolve("url/") },
},
module: { rules: [
styleRule,
Expand Down

0 comments on commit d705db3

Please sign in to comment.