# Okta-auth-js version 5.x =\> Passed in oktaAuth is not compatible with the SDK

**URL:** <https://devforum.okta.com/t/okta-auth-js-version-5-x-passed-in-oktaauth-is-not-compatible-with-the-sdk/15735>\
**Category:** Questions\
**Created:** [August 27, 2021, 5:15am UTC](https://devforum.okta.com/t/okta-auth-js-version-5-x-passed-in-oktaauth-is-not-compatible-with-the-sdk/15735 "2021-08-27T05:15:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![behzad.javani](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@behzad.javani](https://devforum.okta.com/u/behzad.javani)\
**Post date:** [August 27, 2021, 5:15am UTC](https://devforum.okta.com/t/okta-auth-js-version-5-x-passed-in-oktaauth-is-not-compatible-with-the-sdk/15735/1 "2021-08-27T05:15:35Z")

</div>

I have a react application with the following:  
“@okta/okta-auth-js”: “^5.2.3”,  
“@okta/okta-react”: “^6.0.0”,

based on documentation on okta/react repo. okta-react 6.x should be compatible with 5.x.  
however I am getting this error:  
**AuthSdkError: Passed in oktaAuth is not compatible with the SDK, okta-auth-js version 5.x is the current supported version.**  
weird thing is, this error goes away after I refresh the page, it only shows up when I navigate to the page from another page. if I refresh on the page it goes away.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [September 1, 2021, 5:19pm UTC](https://devforum.okta.com/t/okta-auth-js-version-5-x-passed-in-oktaauth-is-not-compatible-with-the-sdk/15735/2 "2021-09-01T17:19:50Z")

</div>

Are you pulling in okta-auth-js separately, or just installing it as a dependency for the React SDK (Auth JS is a peer dependency)? If you clear node\_modules and only install the React SDK, do you still see this error?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 9:04pm UTC](https://devforum.okta.com/t/okta-auth-js-version-5-x-passed-in-oktaauth-is-not-compatible-with-the-sdk/15735/3 "2024-02-12T21:04:22Z")

</div>

Closed on February 12, 2024, 9:04pm UTC


