Mendeley JS SDK客户端凭证流授权

时间:2019-05-16 22:07:51

标签: javascript sdk authorization spfx mendeley

我正在使用Mendeley Javascript SDK构建SPFX SharePoint联机Web部件,并尝试客户端证书流授权。我收到CORS错误: 从源“ https://api.mendeley.com/oauth/token”对“ https://xyz.sharepoint.com”处XMLHttpRequest的访问已被CORS策略阻止:请求的资源上不存在“ Access-Control-Allow-Origin”标头。 * /

private clientCredentialsFlow() {
    var sdk = mendeley;
    var api = sdk({
        authFlow: sdk.Auth.clientCredentialsFlow({
        clientId: 1234,
        clientSecret: 'abcdefghijk',
        redirectUri: 'https://xyz.sharepoint.com/_layouts/15/workbench.aspx'
      })
    });

0 个答案:

没有答案