我正在连接到 Xero oauth 服务器'https://login.xero.com/identity/connect/authorize https://login.xero.com/identity/connect/authorize' 通过 Angular 7 应用程序使用angular-oauth2-oidc
包裹。
在我的 authConfig 中我有以下属性
export const authConfig: AuthConfig = {
issuer: 'https://login.xero.com/identity/connect/authorize',
redirectUri: 'http://127.0.0.1:2114/xerocallback',
clientId: 'XXXXXXXXXX647C2ABBAXXXXXXXXXX',
scope: 'openid profile email offline_access',
responseType: 'code',
};
但是,一旦我初始化 oauth 服务
import { OAuthService } from 'angular-oauth2-oidc';
this.oauthService.configure(authConfig);
我收到以下 CORS 错误
Access to XMLHttpRequest at 'https://login.xero.com/identity/connect/authorize/.well-known/openid-configuration' from origin 'http://localhost:2114' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
知道我做错了什么,
任何建议将受到欢迎
Xero 身份提供商当前不支持PKCE https://oauth.net/2/pkce/来自 SPA 和移动设备的流量 – 它仅支持code
来自服务器端 Web 应用程序的流(您在其中提供client_secret
)。这意味着您目前无法直接从基于浏览器的应用程序访问我们的 API。
如果这对您有用,请在我们的 UserVoice 页面上提出功能请求,我们可以进行调查:https://xero.uservoice.com/ https://xero.uservoice.com/
– 乔什(Xero)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)