我在项目中使用 OKTA 授权,但在运行时遇到错误
尝试谷歌搜索但找不到任何相关的解决方案
这是错误
TypeError: Cannot read properties of undefined (reading '_oktaUserAgent')
at new OktaAuthModule (okta-angular.js:236)
at Object.OktaAuthModule_Factory [as factory] (okta-angular.js:260)
at R3Injector.hydrate (core.js:11354)
at R3Injector.get (core.js:11175)
at core.js:11212
at Set.forEach (<anonymous>)
at R3Injector._resolveInjectorDefTypes (core.js:11212)
at new NgModuleRef$1 (core.js:24308)
at NgModuleFactory$1.create (core.js:24362)
at core.js:28101
Run Code Online (Sandbox Code Playgroud)
这是我的 Appmodule.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { ProductListComponent } from './components/product-list/product-list.component';
import { ProductService …Run Code Online (Sandbox Code Playgroud)