Skip to content

Commit

Permalink
feat: avoid duplicated client_id, when adding a new client_id
Browse files Browse the repository at this point in the history
  • Loading branch information
caojen committed Feb 3, 2024
1 parent cb18d97 commit 3c08603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "google-oauth"
version = "1.10.0"
version = "1.10.1"
edition = "2021"
description = "Google oauth server-side client"
license = "MIT"
Expand Down
7 changes: 7 additions & 0 deletions src/async_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ impl AsyncClient {
let client_id = client_id.to_string();

if !client_id.is_empty() {
// check if client_id exists?
{
if self.client_ids.read().await.contains(&client_id) {
return
}
}

self.client_ids.write().await.push(client_id)
}
}
Expand Down

0 comments on commit 3c08603

Please sign in to comment.