Skip to content

Commit

Permalink
Fixed OIDC settings becasue of new changes in the main settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Rusakov committed Dec 4, 2024
1 parent 93efa10 commit 25a639b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@
}

FEATURE_FLAGS = {
"oidc": os.environ.get("OIDC_ENABLED", "False") == "False",
"registration": os.environ.get("REGISTRATION_ENABLED", "False") == "False",
"oidc": os.environ.get("OIDC_ENABLED", "False") == "True",
"registration": os.environ.get("REGISTRATION_ENABLED", "True") == "True",
}

AUTHENTICATION_BACKENDS = ("django.contrib.auth.backends.ModelBackend",)
Expand Down Expand Up @@ -313,7 +313,7 @@ def discover_endpoints(discovery_url: str) -> dict:


def check_oidc() -> bool:
if FEATURE_FLAGS['oidc']:
if not FEATURE_FLAGS['oidc']:
return False
missing = []
for x in ["OIDC_RP_CLIENT_ID", "ZITADEL_PROJECT", "OIDC_OP_BASE_URL", "OIDC_PRIVATE_KEYFILE"]:
Expand Down
2 changes: 1 addition & 1 deletion oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
UserModel = get_user_model()

def status(request):
return {"OIDC_ENABLED": settings.OIDC_ENABLED}
return {"OIDC_ENABLED": settings.FEATURE_FLAGS["oidc"]}


def _updateUser(user, claims):
Expand Down

0 comments on commit 25a639b

Please sign in to comment.