oauth - Google Oauth 授权重定向 URI 无法接受 URL 最后的/*

标签 oauth oauth-2.0 google-oauth

我一直在做 Stephen grider 类(class),他创建了一个 google oauth 客户端 ID,其授权的 js 来源为 http://localhost:5000授权重定向 URI 为 http://localhost:5000/ * 并且谷歌接受它。但是,当我尝试相同的操作时,它会抛出重定向 URI 错误:无效重定向:无法包含通配符 (*)。我不确定如果没有这个,它还会引起问题。有什么方法可以解决这个问题。我输入了 http://localhost:5000/ 作为临时解决方案。请推荐。

最佳答案

无论您遵循什么类(class),都必须非常古老。我与 Google 一起开发了五年,当时不允许使用通配符重定向 uri。

Authorized redirect URIs For use with requests from a web server. This is the path in your application that users are redirected to after they have authenticated with Google. The path will be appended with the authorization code for access. Must have a protocol. Cannot contain URL fragments or relative paths. Cannot be a public IP address.

重定向 uri 必须是您希望用来处理授权的文件的路径。

关于oauth - Google Oauth 授权重定向 URI 无法接受 URL 最后的/*,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52890301/

相关文章:

oauth-2.0 - 我需要将 google oauth 访问 token 和 ID token 发送到我的后端服务器吗?

facebook oauth,没有基本权限的图片

android - Android 上的 Oauth 使用路标库

c# - 在运行 HTTPS 的应用程序中重定向 URI 作为 HTTP 而不是 HTTPS 发送

javascript - cURL 到 xmlhttprequest

go - 访问 token 在 GO 中过期时如何使用谷歌刷新 token ?

java - 如何以编程方式生成 gcloud 项目 oauth creds client_secret json 文件

grails - 带Grails的Oauth无法与Hotmail一起使用

go - 使用 OAuth2.0 作为 webapp 的授权系统

c# - 使用 C# 访问私有(private) Google 电子表格