Skip to content

Commit

Permalink
allow optional OIDC in configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Jul 11, 2024
1 parent e4ee9c7 commit a42c133
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,21 +322,22 @@
ACCOUNT_FORMS = {"signup": "apps.users.forms.UserSignupForm"}

SOCIALACCOUNT_ONLY = True
SOCIALACCOUNT_PROVIDERS = {
"openid_connect": {
"APPS": [
{
"provider_id": env("OIDC_PROVIDER_ID"),
"name": env("OIDC_PROVIDER_NAME"),
"client_id": env("OIDC_CLIENT_ID"),
"secret": env("OIDC_SECRET"),
"settings": {
"server_url": env("OIDC_PROVIDER_URL"),
if env("OIDC_CLIENT_ID", default=None):
SOCIALACCOUNT_PROVIDERS = {
"openid_connect": {
"APPS": [
{
"provider_id": env("OIDC_PROVIDER_ID"),
"name": env("OIDC_PROVIDER_NAME"),
"client_id": env("OIDC_CLIENT_ID"),
"secret": env("OIDC_SECRET"),
"settings": {
"server_url": env("OIDC_PROVIDER_URL"),
},
},
},
]
]
}
}
}


# Django REST-Framework
Expand Down

0 comments on commit a42c133

Please sign in to comment.