From 4b6c00704a56c43ab8f24516f5be2f8a64df1957 Mon Sep 17 00:00:00 2001 From: expl Date: Tue, 7 Apr 2026 09:58:07 +0900 Subject: [PATCH] Bump dependencies and APIs --- examples/clear_emulator/Cargo.toml | 2 +- examples/cookies/Cargo.toml | 2 +- examples/cookies/src/main.rs | 2 +- examples/get_users/Cargo.toml | 2 +- examples/verify_token/Cargo.toml | 2 +- examples/verify_token/src/main.rs | 2 +- lib/Cargo.toml | 21 ++++++++++----------- lib/src/lib.rs | 8 +++----- 8 files changed, 19 insertions(+), 22 deletions(-) diff --git a/examples/clear_emulator/Cargo.toml b/examples/clear_emulator/Cargo.toml index b18207b..42c726c 100644 --- a/examples/clear_emulator/Cargo.toml +++ b/examples/clear_emulator/Cargo.toml @@ -7,4 +7,4 @@ edition = "2024" [dependencies] rs-firebase-admin-sdk = { path = "../../lib" } -tokio = { version = "1.49", features = ["macros", "rt-multi-thread"] } \ No newline at end of file +tokio = { version = "1.51", features = ["macros", "rt-multi-thread"] } diff --git a/examples/cookies/Cargo.toml b/examples/cookies/Cargo.toml index da25130..9307ec0 100644 --- a/examples/cookies/Cargo.toml +++ b/examples/cookies/Cargo.toml @@ -6,4 +6,4 @@ edition = "2024" [dependencies] rs-firebase-admin-sdk = { path = "../../lib" } time = { version = "0.3" } -tokio = { version = "1.49", features = ["macros", "rt-multi-thread"] } \ No newline at end of file +tokio = { version = "1.51", features = ["macros", "rt-multi-thread"] } diff --git a/examples/cookies/src/main.rs b/examples/cookies/src/main.rs index 5e30a52..560a868 100644 --- a/examples/cookies/src/main.rs +++ b/examples/cookies/src/main.rs @@ -11,7 +11,7 @@ async fn main() { .await .unwrap(); - let live_cookie_validator = live_app.cookie_token_verifier().await.unwrap(); + let live_cookie_validator = live_app.cookie_token_verifier().unwrap(); live_cookie_validator.validate(&cookie).await.unwrap(); } diff --git a/examples/get_users/Cargo.toml b/examples/get_users/Cargo.toml index 6e95fa1..4a00ae5 100644 --- a/examples/get_users/Cargo.toml +++ b/examples/get_users/Cargo.toml @@ -7,4 +7,4 @@ edition = "2024" [dependencies] rs-firebase-admin-sdk = { path = "../../lib" } -tokio = { version = "1.49", features = ["macros", "rt-multi-thread"] } \ No newline at end of file +tokio = { version = "1.51", features = ["macros", "rt-multi-thread"] } diff --git a/examples/verify_token/Cargo.toml b/examples/verify_token/Cargo.toml index 3d08951..6603e61 100644 --- a/examples/verify_token/Cargo.toml +++ b/examples/verify_token/Cargo.toml @@ -7,4 +7,4 @@ edition = "2024" [dependencies] rs-firebase-admin-sdk = { path = "../../lib", features = ["tokens"] } -tokio = { version = "1.49", features = ["macros", "rt-multi-thread"] } \ No newline at end of file +tokio = { version = "1.51", features = ["macros", "rt-multi-thread"] } diff --git a/examples/verify_token/src/main.rs b/examples/verify_token/src/main.rs index 1045a7c..ba19002 100644 --- a/examples/verify_token/src/main.rs +++ b/examples/verify_token/src/main.rs @@ -17,7 +17,7 @@ async fn main() { // Live let oidc_token = std::env::var("ID_TOKEN").unwrap(); let live_app = App::live().await.unwrap(); - let live_token_validator = live_app.id_token_verifier().await.unwrap(); + let live_token_validator = live_app.id_token_verifier().unwrap(); verify_token(&oidc_token, &live_token_validator).await; // Emulator diff --git a/lib/Cargo.toml b/lib/Cargo.toml index af7be04..58f9609 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-firebase-admin-sdk" -version = "4.2.1" +version = "4.3.0" rust-version = "1.88" edition = "2024" authors = ["Kostas Petrikas"] @@ -14,27 +14,26 @@ license = "MIT" doctest = false [features] -default = ["tokens", "reqwest/default-tls"] -rustls-tls = ["reqwest/rustls-tls"] +default = ["tokens"] tokens = ["dep:jsonwebtoken", "dep:jsonwebtoken-jwks-cache"] [dependencies] -tokio = { version = "1.49", features = ["sync"], default-features = false } -error-stack = "0.6" +tokio = { version = "1.51", features = ["sync"], default-features = false } +error-stack = "0.7" thiserror = "2.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" http = "1.4" headers = "0.4" -reqwest = { version = "0.12", features = ["charset", "json"], default-features = false } +reqwest = { version = "0.13", features = ["charset", "json", "hickory-dns", "rustls", "brotli"], default-features = false } urlencoding = "2.1" bytes = "1" -google-cloud-auth = "1.4" +google-cloud-auth = "1.8" time = { version = "0.3", features = ["serde"] } base64 = "0.22" -jsonwebtoken = { version = "10.2", optional = true } -jsonwebtoken-jwks-cache = { version = "0.2", optional = true } +jsonwebtoken = { version = "10", optional = true } +jsonwebtoken-jwks-cache = { version = "0.3", optional = true } [dev-dependencies] -tokio = { version = "1.49", features = ["macros", "rt-multi-thread"] } -serial_test = "3.2" +tokio = { version = "1.51", features = ["macros", "rt-multi-thread"] } +serial_test = "3.4" diff --git a/lib/src/lib.rs b/lib/src/lib.rs index e205089..aabf7af 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -54,9 +54,7 @@ impl App { impl App { /// Create instance of Firebase app for live project with an explicit project ID, /// bypassing environment variable and credential header resolution. - pub async fn live_with_project_id( - project_id: &str, - ) -> Result> { + pub fn live_with_project_id(project_id: &str) -> Result> { let credentials: Credentials = Builder::default() .with_scopes(FIREBASE_AUTH_SCOPES) .build_access_token_credentials() @@ -98,7 +96,7 @@ impl App { /// Create OIDC token verifier #[cfg(feature = "tokens")] - pub async fn id_token_verifier( + pub fn id_token_verifier( &self, ) -> Result> { jwt::LiveValidator::new_jwt_validator(self.project_id.clone()) @@ -107,7 +105,7 @@ impl App { /// Create cookie token verifier #[cfg(feature = "tokens")] - pub async fn cookie_token_verifier( + pub fn cookie_token_verifier( &self, ) -> Result> { jwt::LiveValidator::new_cookie_validator(self.project_id.clone())