Luk*_* Vo 7 javascript browser oauth-2.0 google-identity-toolkit google-identity
我正在尝试调用 GSI Javascriptgoogle.accounts.oauth2.revoke方法。在底层,它向https://oauth2.googleapis.com/revoke发送请求。但是存在 CORS 问题:
await new Promise(r => google.accounts.oauth2.revoke(token, r));
Run Code Online (Sandbox Code Playgroud)
从源“https://localhost:44397”访问“https://oauth2.googleapis.com/revoke”处的 XMLHttpRequest 已被 CORS 策略阻止:“Access-Control-Allow-Credentials”标头的值当请求的凭据模式为“include”时,响应为“”,该响应必须为“true”。XMLHttpRequest 发起的请求的凭据模式由 withCredentials 属性控制。
这些是与 CORS 相关的响应标头:
访问控制允许来源: https://localhost:44397
访问控制公开标头:日期、变化、变化、变化、内容编码、服务器、内容长度
然而,所有其他功能都运行良好。这是谷歌方面的错误还是我的代码?如果是 Google 的问题,我该在哪里举报?如果是我的问题,我做错了什么?
| 归档时间: |
|
| 查看次数: |
707 次 |
| 最近记录: |