I am using multiple files like app.module.ts, app.component.ts, OktaConfigInitService, and AuthInterceptor.
Additionally, the okta versions I am using as below:
“@okta/okta-angular”: “^6.4.0”,
“@okta/okta-auth-js”: “^7.10.0”
Can you please help on this issue?
Thanks for your prompt response @alisaduncan.
Please find below my Okta configuration file, which is imported in the AppModule and used in provider like
It looks like you’re missing creating the OktaAuth instance in the provider.
You’ll need something like the snippet below for the provider (or make a similar change to create the instance of OktaAuth in the getOktaConfig() method).
Please note this is untested, and I’m not sure I got the syntax 100% correct off the top of my head, but hopefully it’ll get you there.
Most of the time, when I pass the oktaAuth in the oktaConfig, either in the provider as you suggested above in the AppModule or in the Okta configuration file as below.
getOktaConfig() {
return {
oktaAuth: new OktaAuth(this.OKTA_CONFIG)
};
}