如何在Google控制台中为oAuth2添加或更改Return URI [英] How to add or change return uri in google console for oAuth2

查看:96
本文介绍了如何在Google控制台中为oAuth2添加或更改Return URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的网络服务中使用google oAuth,我已经创建了新的oAuth密钥,但是当我使用它时,我会得到

I want to use google oAuth from my webservice i have created new oAuth key but when I use it i get

Error: redirect_uri_mismatch
The redirect URI in the request: www.blabla.com
did not match a registered redirect URI

现在,在哪里可以找到注册的重定向URI进行更改,或者在哪里可以添加另一个重定向URI. 在控制台的"API访问"菜单下,我只能编辑品牌信息",创建另一个客户ID"和编辑允许的域",但是我无权添加一个.

Now, where to find the registered redirect URI to change it, or where can I add another one. Under "API Access" menu of the console I can only "Edit brand information", "Create Another Client ID" and "Edit allowed domains", but I don't have permissions to add one.

推荐答案

我的问题是我为服务帐户"创建了一个客户端ID.而且甚至都没有尝试过"Web应用程序"向导.因为我的控制器正在发出Web请求,所以"Web应用程序"选项是正确的选择.傻我

My problem was that I have created an Client ID for "Service account". And didn't even tried the wizard for "Web application". Because my controller was making a web request the Web Application option is the right one. Silly me.

在"Web应用程序客户端ID"设置下,您可以调整返回uri,而服务帐户"设置则没有该选项.

Under the Web Application Client ID settings you can adjust the return uri, and Service Account settings don't have that option.

这篇关于如何在Google控制台中为oAuth2添加或更改Return URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆