问题描述
通过我们的使用Google登录"按钮将用户重定向到https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=[clientid]&redirect_uri=http://example.com/googleauth&scope=email
时,导致重定向回网站的响应的Location
标头末尾带有#
符号:
When the user is redirected to https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=[clientid]&redirect_uri=http://example.com/googleauth&scope=email
by our "Sign In with Google" button, the response's Location
header that causes the redirection back to the site has a #
symbol at the end:
它当然不会破坏网站的功能,但是无论如何我都希望摆脱它.我的初始请求URL是否有问题,还是我最终需要诉诸基于JavaScript的解决方案?
It certainly does not break the site's funcionality, but I'd like to get rid of it anyway. Is there something wrong with my initial request URL, or do I need to resort to a JavaScript based solution on my end?
推荐答案
您的重定向URL或客户端代码没有错.这是Google最近添加的内容,但您不必担心,也请参见: Google OAuth代码附加了额外的#" 和#添加到Google+ OAuth 2.0回调URL
There's nothing wrong with your redirect URL or client side code. This is something that Google recently added but should be of no concern to you, see also: Google OAuth code appends extra "#" in response and # added to Google+ OAuth 2.0 callback URL
这篇关于Google OAuth服务重定向到末尾带有#号的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!