【问题标题】:Getting 'cannot read properties of undefined (reading 'redirectUri') error获取'无法读取未定义的属性(读取'redirectUri')错误
【发布时间】:2021-10-22 08:05:00
【问题描述】:

我正在尝试从 okta 获取详细信息并将它们存储在商店中。我有一个@effect,它将调用服务文件a-service.ts

我在服务构造函数中调用 okta 库,如下所示

@Injectable()
export class test{
  constructor (public a : oktaAuthService){
  }

  public getDetails(){console.log("metohod loading")}
  }
}

获取错误异常:

未处理的承诺拒绝:无法读取未定义的属性 (阅读:'redirectUri');区域:;任务;承诺。那么;价值; TypeError: cannot read properties of undefined... at new OktaAuthService (okta-angular.js:44)........

【问题讨论】:

标签: angular okta


【解决方案1】:

我从未使用过上述服务,但我想你可能会在这里找到一些东西

https://developer.okta.com/code/angular/okta_angular_auth_js/#create-an-authentication-service

您还可以分享有关 oktaAuthService 文件的更多详细信息,以在读取 redirectUri 时检查未定义值的确切位置。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-06
    • 2021-12-31
    • 2022-10-05
    • 1970-01-01
    • 1970-01-01
    • 2022-07-03
    • 2022-12-24
    • 2023-02-26
    相关资源
    最近更新 更多