Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Google OAuth服务重定向到URL,并在末尾加上#号_Php_Url_Oauth_Google Oauth_Fragment Identifier - Fatal编程技术网

Php Google OAuth服务重定向到URL,并在末尾加上#号

Php Google OAuth服务重定向到URL,并在末尾加上#号,php,url,oauth,google-oauth,fragment-identifier,Php,Url,Oauth,Google Oauth,Fragment Identifier,当用户被重定向到https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=[客户端ID]&重定向\u uri=http://example.com/googleauth&scope=email通过我们的“使用谷歌登录”按钮,导致重定向回站点的响应的位置头的末尾有一个符号: 响应标题:位置: 它当然不会破坏网站的功能,但我还是想把它去掉。我的初始请求URL是否有问题,或者我是否需要求助于基于JavaScript的解

当用户被重定向到
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=[客户端ID]&重定向\u uri=http://example.com/googleauth&scope=email
通过我们的“使用谷歌登录”按钮,导致重定向回站点的响应的
位置
头的末尾有一个
符号:

响应标题:
位置:


它当然不会破坏网站的功能,但我还是想把它去掉。我的初始请求URL是否有问题,或者我是否需要求助于基于JavaScript的解决方案?

重定向URL或客户端代码没有问题。这是谷歌最近添加的内容,但您不必担心,另请参见:而且

那么,这不是我们这边的问题。我想我需要做一些JS魔术来摆脱它;如果是这样,那么根据HTTP规范,该用户代理实际上已经损坏