这可能是我异常愚蠢的一个例子。
我已经完成了以下文档中的所有步骤:https://manfredsteyer.github.io/angular-oauth2-oidc/
我已经设法让远程html登录页面返回,但angular应用程序正在大惊小怪--即:
error loading discovery document HttpErrorResponse {headers: HttpHeaders, status: 200, statusText: "OK", etc. etc. etc.和
core.js:12584 ERROR Error: Uncaught (in promise): HttpErrorResponse: {"headers": {"normalizedNames":这是我的app.component.ts
import { Component, OnInit } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
import { JwksValidationHandler } from 'angular-oauth2-oidc';
import { authConfig } from './metex/config/auth.config';
import { Router } from '@angular/router';
import { AnalyticsService } from './@core/utils/analytics.service';
@Component({
selector: 'metex-dashboard',
template: '<router-outlet></router-outlet>',
})
export class AppComponent implements OnInit {
constructor(
private analytics: AnalyticsService,
private oauthService: OAuthService,
) {
this.oauthService.configure(authConfig);
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.loadDiscoveryDocumentAndLogin();
this.oauthService.initImplicitFlow();
}
ngOnInit(): void {
this.analytics.trackPageViews();
}
}请发送帮助:)
发布于 2019-03-21 09:23:17
我设法解决了这个问题,尽管不幸的是,这并不是什么聪明的事情。我正在使用的Oauth中有一个自定义的步骤,我发誓我复制的配置文件,我没有...一如既往,纯粹的用户错误。
https://stackoverflow.com/questions/55252740
复制相似问题