ca_bundle

This commit is contained in:
2026-05-11 11:00:03 +12:00
parent 9130629b58
commit 94712fc7fd
4 changed files with 33 additions and 1 deletions
+6 -1
View File
@@ -9,6 +9,11 @@ from app.core.settings import get_settings
def get_oauth() -> OAuth:
settings = get_settings()
oauth = OAuth()
verify_ssl: bool | str = (
settings.azure_oauth_ca_bundle
if settings.azure_oauth_ca_bundle
else settings.azure_oauth_verify_ssl
)
oauth.register(
name="azure",
client_id=settings.azure_client_id,
@@ -17,6 +22,6 @@ def get_oauth() -> OAuth:
f"https://login.microsoftonline.com/{settings.azure_tenant_id}"
"/v2.0/.well-known/openid-configuration"
),
client_kwargs={"scope": "openid profile email"},
client_kwargs={"scope": "openid profile email", "verify": verify_ssl},
)
return oauth