Okta authState is null when code parameter is present on URL

Hello everyone,

We’re integrating with LinkedIn and when the user authorizes our app there, they add to the redirect URI a parameter called code .

http://localhost:3000/authentication/linkedIn?code=XXX

We figured out that when “code” is present on the URI the authState is null and it never updates.

AUTHSTATE-not-REFRESHING

If I changed “code” to anything else:

http://localhost:3000/authentication/linkedIn?hello=XXX

AUTHSTATE-REFRESHING

I think that the word code is an Okta reserved word, but I couldn’t find anything on the documentation about it.

Also, we cannot change the “code” word as it’s LinkedIn that’s placing it in the URL. I may have some ideas to fix it but I consider them not good practices.

Hope somebody can help us figure out how can we fix this.

Did you get any answer? Pleaes let me know. I am also facing the same issue.
Okta documents are not updated as per latest version of react and okta