如何为Google OAuth 2添加多个重定向URI? [英] How to add multiple redirect URIs for Google OAuth 2?
问题描述
我尝试使用,它指定了:
redirect_uri:在Developers Console中为此项目列出的redirect_uri值之一
。
确定发送响应的位置。此参数的
值必须与Google Developers Console中此项目中列出的
中的一个值完全匹配(包括http
或https方案,大小写和尾部'/')。
我有几个问题: 正常情况下,当您在Google或其他地方添加多个链接时,您可以通过 不需要复杂的应用程序配置或新的键。 < img src =https://dl.dropboxusercontent.com/u/45068589/SO_GoogleMultipleURI.jpgalt =image> 关于第二个问题:您必须进入同意屏幕标签来更改您的应用信息例如您的 I am trying to make Google OAuth 2 authentication work with a toy app I am running on my computer (at However when my app connects to Google to authenticate the user, Google responds with this error page: My app, named "My Hobby App", is configured in the Developer Console as such: In the Google OAuth 2 docs, it is specified that: redirect_uri: One of the redirect_uri values listed for this project
in the Developers Console. Determines where the response is sent. The
value of this parameter must exactly match one of the values listed
for this project in the Google Developers Console (including the http
or https scheme, case, and trailing '/'). I have a couple of questions:
redirect_uri
s添加到我的应用程序?
如何将多个redirect_uris添加到我的应用程序中?
,
或;
将其分开,但使用重定向URI你必须使用一条新线,但实际上并不是很直观。所以当你按 Edit Settings
按钮时,如果你有更多的链接,用换行符分隔( enter),你可以添加到URI和/或起源
为什么Google将我的应用程序识别为Project Default Service Account而不是My Hobby App?
PRODUCT NAME
, HOMEPAGE
, LOGO
等。localhost:8080
) using Social Auth for Java.
redirect_uri
s to my app?
It's actually easier than you think, unfortunately it took me a couple of hours to figure it out.
How can I add multiple redirect_uris to my app?
Normally when you add multiple link to something on Google or elsewhere you separate it by ,
or ;
but with Redirect URIs you have to use a new line, it's actually not very intuitive. So when you press Edit Settings
button, you can add to the URI and/or Origins if you have a couple more links, separated by newlines (enter
).
No need for complicated app configurations or new keys.
Why is Google identifying my app as "Project Default Service Account" rather than "My Hobby App"?
On your second question: You have to go to the "Consent Screen" tab to change your app info such as your PRODUCT NAME
, HOMEPAGE
, LOGO
, etc.
这篇关于如何为Google OAuth 2添加多个重定向URI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!