1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-04 21:15:22 +02:00

fix: Add cacertfile to client args when provided (#4451)

This commit is contained in:
Carter 2024-10-25 11:53:58 -05:00 committed by GitHub
parent f7e595b404
commit ea0d2ece6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,12 +30,16 @@ if settings.OIDC_READY:
oauth = OAuth()
groups_claim = settings.OIDC_GROUPS_CLAIM if settings.OIDC_REQUIRES_GROUP_CLAIM else ""
scope = f"openid email profile {groups_claim}"
client_args = {"scope": scope.rstrip()}
if settings.OIDC_TLS_CACERTFILE:
client_args["verify"] = settings.OIDC_TLS_CACERTFILE
oauth.register(
"oidc",
client_id=settings.OIDC_CLIENT_ID,
client_secret=settings.OIDC_CLIENT_SECRET,
server_metadata_url=settings.OIDC_CONFIGURATION_URL,
client_kwargs={"scope": scope.rstrip()},
client_kwargs=client_args,
code_challenge_method="S256",
)