Perl module not adding state parameter in OpenID call required for OKTA

Hello All, I am writing a Perl web application.and i am getting the following error "http://testchandan.com:5001/?error=invalid_request&error_description=The+authentication+request+has+an+invalid+‘state’+parameter."

Plack::Middleware OAUTH module generating the Authentication request for the following https://dev.oktapreview.com/oauth2/v1/authorize?response_type=code&scope=openid&redirect_uri=http%3A%2F%2Ftestchandan.com%3A5001%2Fsynchronydev%2Fcallback&client_id=0oaze2n479fgbqisx0h7 `

I have added the “state” parameter in the module config but the call is not generating the call with “state” parameter. Do we have any process in order to bypass the “state” parameter in OKTA?

Okta requires that the ‘state’ parameter to be included in all authorize call as a security, as noted in our documentation: OpenID Connect & OAuth 2.0 API | Okta Developer.

You likely will need to investigate why, when you are trying to add the state parameter to the config, you do not see it getting included in the authorize URL it generates and if there is something about the perl module that is preventing you from passing in this parameter.