Google api 尝试从google ouath检索刷新令牌时出现CORS

Google api 尝试从google ouath检索刷新令牌时出现CORS,google-api,oauth-2.0,cors,Google Api,Oauth 2.0,Cors,跟随[https://developers.google.com/accounts/docs/OAuth2InstalledApp][1] 我正在尝试获取用户刷新令牌,但发送如下请求: POST /o/oauth2/token HTTP/1.1 Host: accounts.google.com Content-Type: application/x-www-form-urlencoded code=4/v6xr77ewYqhvHSyW6UJ1w7jKwAzu& client_

跟随[https://developers.google.com/accounts/docs/OAuth2InstalledApp][1] 我正在尝试获取用户刷新令牌,但发送如下请求:

    POST /o/oauth2/token HTTP/1.1
Host: accounts.google.com
Content-Type: application/x-www-form-urlencoded

code=4/v6xr77ewYqhvHSyW6UJ1w7jKwAzu&
client_id=8819981768.apps.googleusercontent.com&
client_secret={client_secret}&
redirect_uri=https://oauth2-login-demo.appspot.com/code&
grant_type=authorization_code
我遇到cors问题-访问控制允许来源不允许


有人有这个问题吗?

请记住,刷新令牌不用于客户端代码。特别是,你以这种方式披露你的客户秘密。刷新令牌只能在服务器端代码中使用,您将不受浏览器强制执行的源控件的约束。

请记住,刷新令牌不用于客户端代码。特别是,你以这种方式披露你的客户秘密。刷新令牌只应在服务器端代码中使用,在服务器端代码中,您将不受浏览器强制执行的源控件的约束。

太遗憾了,文档没有这样说。。。太遗憾了医生没有这么说。。。