Type 'OktaAuth' is not assignable to the type 'OktaAuthBrowser

I’m getting the following complicated type error trying to pass a new OktaAuth(oktaConfig); to the tag. Any ideas what I’ve got wrong here? I’m using these versions:

"@okta/okta-auth-js": "^5.0.1",
"@okta/okta-react": "^5.1.2",

I am also having this issue.

I have discovered the reason for my issue. @okta/octa-react has @okta/octa-auth-js contained within its node module folder. so removing my extraneous okta-auth-js add with yarn solved the problem. In other words, since octa 5, one need only yarn add @okta/okta-react, and no longer need to additional yarn add @okta/okta-auth-js as it is now a dependency of @okta/okta-react, instead of a peer dependency. once i removed okta–auth-js, my type error disappeared.

1 Like

Wow - great work. Thanks

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.