AuthSdkError: No oktaAuth instance passed to Security Component

Hi,

I’ve been trying to add Okta user auth to my Reactjs application.
I’ve followed several guides:

but I always end up with the same error - the one in the title of this post.

I think I’ve properly configured the Security object

These are the actual props on the Security component when this error is displayed:

clientId:“xxxxxxxxxxxxxxxxxxxxx”
issuer:“https://dev-xxxxxxxx.okta.com/oauth2/default
onAuthRequired
redirectUri:“http://localhost:3000/login/callback

note - I’ve obfuscated the values but you get the gist.

Thanks for the help.

A lot has changed in the 4.x version of our React SDK. See this migration guide for more information.

You can also use OktaDev Schematics for React to create a React app and install Okta quickly.

1 Like

Thanks for the prompt answer. It did solve my issue.

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