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

Next.js集成Google Provider时遭遇OAuthSignin错误求助

Google OAuth登录报错:signin?error=OAuthSignin
  • 登录时触发错误,跳转至signin?error=OAuthSignin,页面提示“try signing in with a different account”
  • 控制台错误截图地址:https://i.sstatic.net/JXouZ.png

当前配置信息

NextAuth.js Google Provider 代码配置

providers: [
        GoogleProvider({
            clientId: process.env.GOOGLE_ID,
            clientSecret: process.env.GOOGLE_CLIENT_SECRET,
        })
    ],

.env 文件内容

GOOGLE_ID = string.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET = string

已尝试的无效操作

  • 给.env文件中GOOGLE_ID的值添加引号(如GOOGLE_ID = "stuff"),问题未解决
  • 查阅相关资料,仍未找到可行解决方案,恳请指导

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.12 03:27:04