From d6fec3f4dcc76e853b3d11981edde2e9bbba666d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=BF=90=E5=AE=B6?= Date: Thu, 23 Jan 2025 16:04:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/src/social/google.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/library/src/social/google.rs b/library/src/social/google.rs index a8a1892..e35c8b4 100644 --- a/library/src/social/google.rs +++ b/library/src/social/google.rs @@ -196,8 +196,6 @@ impl GoogleSocial { } /// 验证ID Token并考虑kid匹配 - /// - /// TODO: 考虑使用oauth2开发库来实现game account的校验 pub async fn verify_id_token(&self, id_token: &str) -> SocialResult { // 获取并解析公钥 let public_keys = self.fetch_and_parse_google_public_keys().await?; @@ -213,11 +211,7 @@ impl GoogleSocial { let kid = kid.unwrap(); // 根据kid找到正确的公钥 - let key = public_keys - .get(&kid); - - // TODO: - // 如果是google game account,可能找不到正确的公钥,需要使用oauth2开发库来实现相应的校验 + let key = public_keys.get(&kid); match key { Some(key) => {