You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google OpenID移动端客户端仅请求id_token失败原因咨询及验证

问题描述

我正尝试通过Google的OpenID登录获取ID token。

我已成功实现,但必须将response_type设置为code id_token。然而我并不需要也不想要code!我期望的response_type为id_token,且该类型在Google公开的OpenID配置中已标注为支持。

我的客户端ID为移动端客户端ID(iOS),下方是可正常运行的请求(为便于阅读添加了换行):

https://accounts.google.com/o/oauth2/v2/auth?
   client_id=...&
   response_type=code%20id_token&
   scope=openid%20profile%20email&
   redirect_uri=reversed.client.id:/oauth2callback&
   nonce=...&
   state=...

若将response_type的值替换为id_token,则会出现如下错误:
登录流程错误

我的请求中哪部分存在问题,导致Google拒绝该响应类型?


内容的提问来源于stack exchange,提问作者Frizlab

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 09:50:56