
78aky (78aky) asked a question.
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.
If I changed "code" to anything else:
http://localhost:3000/authentication/linkedIn?hello=XXX
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.

Hello @78aky (78aky) Thank you for reaching our to our Community!
Please review our documentations that might provide the answer that you are looking for:
https://developer.okta.com/docs/guides/sign-into-spa-redirect/react/main/#create-an-okta-integration-for-your-app
https://support.okta.com/help/s/article/How-to-Authenticate-with-HTTP-Cards-Okta-Workflows?language=en_US
My advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
Hi Paul. Thank you for your response. I'm gonna see the docs you sent. I've also created the post on the dev forum. https://devforum.okta.com/t/okta-authstate-is-null-when-code-parameter-is-present-on-url/20788
Facing similar bug. Any updates on the solution?
Hello Vakhob, I've created also this topic on the devs forum Okta authState is null when code parameter is present on URL - Questions - Okta Developer Community.
We also faced this with the Twitter integration, so we did a workaround. If any route comes with the "code " param, we change it to "c". Obviously, you can change it for whatever you want, but this is working for us right now.