rak*_*rak 1 coldfusion oauth coldfusion-11
我正在尝试使用<cfoauth>标记登录,但我无法这样做.它正在显示
错误:invalid_request
以下是我的代码.
<cfoauth
type = "google"
clientid = "*****************es7t0r6qc"
secretkey = "**************tSF97WncM5ix9jtvD200"
result = "result"
scope="https://www.googleapis.com/auth/plus.me"
redirecturi = "http://192.168.9.126:8088/bootstrap-blog-template/tpl/cfoauth.cfm"
>
Run Code Online (Sandbox Code Playgroud)
请帮忙.
这个问题似乎与此有关redirecturi.您需要提供身份验证后要重定向到的页面的现有且有效的URL.
例如,如果您正在测试代码的页面的本地URL是http:// localhost:8500/cfbuster/login.cfm,那么redirecturi可以是同一页面,即http:// localhost:8500/cfbuster/login.cfm或其他页面http:// localhost:8500/cfbuster/doLogin.cfm.
除此之外,redirecturi您希望设置,应保存在Google Developers Consele >> API Manager >> Credentials屏幕下Authorized redirect URIs.在我的例子中,它是http:// localhost:8500/cfbuster/test.cfm
如果redirecturi传递不存在或未保存在API Authorized redirect URIs屏幕中,我们会收到以下错误消息:
注1:redirecturi必须有一个协议.不能包含URL片段或相对路径.不能是公共IP地址.
注意2:https : //www.googleapis.com/auth/plus.login是推荐的登录范围.建议不要将https://www.googleapis.com/auth/plus.me范围用作登录范围,因为对于尚未升级到Google+的用户,它不会返回用户的姓名或电子邮件地址.
| 归档时间: |
|
| 查看次数: |
275 次 |
| 最近记录: |