问题
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:
Response headers:
location: http://example.com/googleauth?code=[code]#
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?
回答1:
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
来源:https://stackoverflow.com/questions/30197708/google-oauth-service-redirects-to-url-with-a-sign-at-the-end