我正在开发一个 NextJS 应用程序,使用 next-auth 并使用 Google Oauth 2 作为其身份验证提供程序。生产版本正在 Heroku 上运行。当尝试登录我的生产版本时,Google OAuth 为我提供了"Error 400: redirect_uri_mismatch". 通常,这很容易修复,除非确切的 uri 已在 Cloud Console 中注册。
。
我还尝试添加我的 uri 的许多不同排列,但这没有帮助。
\n\n问题中的错误:
\nError 400: redirect_uri_mismatch\n\nYou can\'t sign in to this app because it doesn\'t comply with Google\'s OAuth 2.0 policy.\n\nIf you\'re the app developer, register the redirect URI in the Google Cloud Console.\n\nRequest Details\nIf you\xe2\x80\x99re the app developer, make sure that these request details comply …Run Code Online (Sandbox Code Playgroud) heroku oauth-2.0 google-oauth google-cloud-platform next-auth