@@ -215,14 +215,15 @@ async def check_oidc_auth(
215215 return None
216216 token = login_dict ["token" ]
217217
218+ client = self .api ._hs .get_proxied_http_client ()
218219 oidc = self .config .oidc
219- oidc_metadata = await get_oidp_metadata (oidc .issuer , self . api . http_client )
220+ oidc_metadata = await get_oidp_metadata (oidc .issuer , client )
220221
221222 # Further validation using token introspection
222223 data = {"token" : token , "token_type_hint" : "access_token" , "scope" : "openid" }
223224
224225 try :
225- introspection_resp = await self . api . http_client .post_json_get_json (
226+ introspection_resp = await client .post_json_get_json (
226227 oidc_metadata .introspection_endpoint ,
227228 data ,
228229 headers = basic_auth (oidc .client_id , oidc .client_secret ),
@@ -303,6 +304,8 @@ async def check_custom_flow(
303304 return None
304305 token = login_dict ["token" ]
305306
307+ client = self .api ._hs .get_proxied_http_client ()
308+
306309 check_claims = {}
307310
308311 user_id_str = self .api .get_qualified_user_id (username )
@@ -350,7 +353,7 @@ async def check_custom_flow(
350353 ]
351354 }
352355
353- await self . api . http_client .post_json_get_json (
356+ await client .post_json_get_json (
354357 self .config .custom_flow .notify_on_registration_uri ,
355358 {"token" : login_dict ["token" ]},
356359 headers = headers ,
0 commit comments