Skip to content

Commit

Permalink
moved SOCIALACCOUNT_PROVIDERS to settings_production.py
Browse files Browse the repository at this point in the history
  • Loading branch information
4-dash committed Jan 27, 2025
1 parent 70a655f commit 6f0818d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +170,11 @@

ACCOUNT_LOGOUT_REDIRECT_URL ='/accounts/login/'


SOCIALACCOUNT_ADAPTER = 'feedback.auth_adapter.FeedbackSocialAccountAdapter'

SOCIALACCOUNT_ONLY = True
ACCOUNT_EMAIL_VERIFICATION = 'none'

SOCIALACCOUNT_PROVIDERS = {
"openid_connect": {
"APPS": [
{
"provider_id": "keycloak",
"name": "Keycloak",
"client_id": "",
"secret": "",
"settings": {
"server_url": "",
},
}
]
}
}

# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
Expand Down
17 changes: 17 additions & 0 deletions src/settings_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,25 @@
URL_PREFIX = 'feedback/'
LOGIN_URL = '/' + URL_PREFIX[:-1] + LOGIN_URL
LOGIN_REDIRECT_URL = '/' + URL_PREFIX[:-1] + LOGIN_REDIRECT_URL
ACCOUNT_LOGOUT_REDIRECT_URL = '/' + URL_PREFIX[:-1] + ACCOUNT_LOGOUT_REDIRECT_URL
SESSION_COOKIE_SECURE = True

SOCIALACCOUNT_PROVIDERS = {
"openid_connect": {
"APPS": [
{
"provider_id": "keycloak",
"name": "Keycloak",
"client_id": secrets.KEYCLOACK_CLIENT_ID,
"secret": secrets.KEYCLOACK_SECRET,
"settings": {
"server_url": secrets.KEYCLOACK_SERVER_URL,
},
}
]
}
}

# @see https://docs.djangoproject.com/es/1.9/topics/email/
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

Expand Down

0 comments on commit 6f0818d

Please sign in to comment.