我通过使用该软件包的 Angular 7 应用程序连接到 Xero oauth 服务器“ https://login.xero.com/identity/connect/authorize ”。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.
任何关于我做错了什么的想法,任何建议都会受到欢迎