ca_bundle
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user