javascript访问令牌

时间:2019-09-17 16:01:51

标签: angular oauth-2.0

我一直在进行/oauth/authorize的调用,并且API也在前端提取了调用,就像这样:

fetch(`https://sandbox.dev.clover.com/oauth/token?client_id=${appId}&client_secret=${appSecret}&code=${cloverCode}`)
.then(results => { return results.json(); })
.then(data => { console.log(data)
  

CORS策略已阻止从来源“ https://sandbox.procore.com/oauth/token”访问“ http://localhost:4200”处的XMLHttpRequest:请求的资源上没有“ Access-Control-Allow-Origin”标头。

0 个答案:

没有答案