问题描述
我正在尝试让OAuth与Blue Button一起使用。我将Angular v10.2.0与angular-oauth2-oidc v10.0.3一起使用。根据{{1}}文档here和here,我将代码设置如下。
angular-oauth2-oidc
但是,当我查看JavaScript控制台时,仅看到export class DefaultComponent implements OnInit {
constructor(private http: HttpClient,private oauthService: OAuthService) {
const authConfig: AuthConfig = {
issuer: 'https://sandBox.bluebutton.cms.gov/v1/o/authorize/',redirectUri: 'http://localhost:4200',clientId: 'some-client-id',responseType: 'code',scope: 'patient/Patient.read patient/Coverage.read patient/ExplanationOfBenefit.read profile',showDebuginformation: true
};
this.oauthService.configure(authConfig);
this.oauthService.initCodeFlow();
this.oauthService.tryLoginCodeFlow().then(
r => console.log(`result: ${r}`),e => console.error(`error: ${e}`)
);
}
}
处于打印状态。其中一份文档说,要将用户重定向到Auth Server的登录表单,我只能调用false
,但这样做不会有任何结果。
关于如何使此代码正常工作的任何想法?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)