pfzetto / axum-oidc

A OpenID Connect Client Libary for axum
https://crates.io/crates/axum-oidc
22 stars 7 forks source link

Replace `openidconnect::reqwest::async_http_client` with custom reqwest client #18

Closed heimmat closed 2 months ago

heimmat commented 2 months ago

Circling back to #12 I did encounter a new blocker.

While the discovery now works, I still encounter certificate issues which I trace back to your usage of openidconnect::reqwest::async_http_client in middleware.rs. Apparently, client discovery is not the only time my application will directly contact the OIDC server.

Do you see a way to also insert a custom reqwest::Client there?

pfzetto commented 2 months ago

Hello, this seems to be a bug. The request::Client should be stored in OidcClient and used in the middleware.

pfzetto commented 2 months ago

Hello, please try 9dd85a770357eb2718b4117836c3b23482766c2d (currently on master). You just need to create the OidcClient with a custom reqwest client. It is now reused in the Middleware.

heimmat commented 2 months ago

I updated my Cargo.toml and this seems to just work as expected. Thanks a lot for your quick help!

Do you have any plans yet for when you'll release to crates.io?