Google BigQuery将uris重定向到UNC路径 [英] Google BigQuery, redirect uris to the UNC path

查看:109
本文介绍了Google BigQuery将uris重定向到UNC路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建使用Google BigQuery的Web应用程序,该应用程序也将获得访问和刷新令牌。



我的web应用程序将托管在intranet中,可以在 http:// mywebapp /



为了访问它,需要客户端ID,因此我去了console.developers.google.com并尝试创建Web应用程序的客户端ID。我必须在这里输入两项 JAVASCRIPT ORIGINS REDIRECT URIS ,这是我的问题:



Google拒绝接受 http:// mywebapp / oauth2callback 作为重定向uri,但接受 http:// mywebapp / b


$ b


无效的重定向URI。


Google接受 http://mywebapp.com http:// localhost ,但这并不能帮助我。



Ist这是一个错误还是设计?

解决方案

这里的问题是 origin 重定向 URI。



当然,起源是连接来自何处。这可以是您自己的本地网络,本地主机或内联网,只要真正的始发地址将与您在配置中注册的地址相匹配,一切都会顺利。



另一方面,重定向是Google授权服务器在授权后将发回请求的地方。在这种情况下,提供内部地址是不可能的,因为Google无法将这些地址重定向到私密地址。


I'm creating the web application which uses Google BigQuery, which will get the access and refresh token as well.

My web application will be hosted in the intranet, lets say under http://mywebapp/

In order to access it one needs the client ID, so I went to console.developers.google.com and tried to create the "Client ID for web application". I have to enter two things there JAVASCRIPT ORIGINS and REDIRECT URIS and here is my problem:

Google refuses to accept http://mywebapp/oauth2callback as redirect uri, but accepts http://mywebapp/ as javascript origin.

The error is:

Invalid redirect URI.

Google accepts "http://mywebapp.com" and "http://localhost", but that doesn't help me.

Ist this a bug or by design?

解决方案

The issue here is the difference between origin and redirect URIs.

The origin is, of course, where the connection comes from. This can be your own local network, localhost or an Intranet, as long as the real originating address will match with the one registered in your configuration, everything will go OK.

On the other hand the redirect is where Google Authorization server will send back the request once it has been authorised. In this case providing an internal address is not possible as Google is not able to redirect to those addresses as they're private.

这篇关于Google BigQuery将uris重定向到UNC路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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