Hi,
I am trying to integrate @okta/okta-auth-js npm module along with Okta Angular SDK in my already existing angular application running on Node v12.18.3 and Angular version v10.2.5. On trying to integrate this, I am getting issues from from the typings file as to showing the modules are not found while doing the imports. And on calling any methods from service, getting the circular dependency issue.
Also, sometimes the issue is - No provider for e!. I tried this with only the basic functionality of the sdk integrated. I am not sure if I am using an unsupported version of the sdk.
Immediate support on this is highly appreciated.
Adding to this question:
I created a sample app for angular 12. When config code is placed in authModule, I get the following error in ng serve:
namespace @angular/core/core has no exported member ‘ɵɵfactorydeclaration’
This is the code present in AppModule:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { OKTA_CONFIG, OktaAuthModule } from '@okta/okta-angular';
import { OktaAuth } from '@okta/okta-auth-js';
const config = {
issuer: '', //credentials not provided here but given
clientId: '', //clientId provided
redirectUri: window.location.origin + '/login/callback',
};
const oktaAuth = new OktaAuth(config);
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, OktaAuthModule],
bootstrap: [AppComponent],
providers: [
{
provide: OKTA_CONFIG,
useValue: { oktaAuth },
},
],
})
export class AppModule {}