Skip to content

Commit f95e214

Browse files
fix(oauth): enable reqwest json feature (#428)
1 parent 0e127f8 commit f95e214

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/methods/shield-oauth/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ oauth2 = { version = "5.0.0", default-features = false, features = [
2525
"reqwest",
2626
] }
2727
regex.workspace = true
28+
reqwest = { version = "0.12.28", features = ["json"] }
2829
secrecy.workspace = true
2930
serde.workspace = true
3031
serde_json.workspace = true

packages/methods/shield-oauth/src/actions/sign_in_callback.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl<U: User + 'static> MethodAction<OauthProvider, OauthSession> for OauthSignI
225225
let user_response = async_http_client
226226
.get(&provider.user_url)
227227
.bearer_auth(token_response.access_token().secret())
228+
.header("Accept", "application/json")
228229
.send()
229230
.await
230231
.map_err(|err| ShieldError::Request(err.to_string()))?;

packages/methods/shield-oauth/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use oauth2::reqwest::{self, redirect::Policy};
1+
use reqwest::{self, redirect::Policy};
22
use shield::ConfigurationError;
33

44
pub fn async_http_client() -> Result<reqwest::Client, ConfigurationError> {

0 commit comments

Comments
 (0)