<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y0000771DKSSA2Okta Classic EngineSingle Sign-OnAnswered2024-04-15T12:05:25.000Z2019-11-21T22:06:25.000Z2019-11-26T15:19:38.000Z

kc6ba (kc6ba) asked a question.

error: PKCE code verifier is required when the token endpoint authentication method is 'NONE'.

I'm trying to do an exchange of an openID authorization code for a token, but I keep hitting this error.

 

When I hit the api to see how my app is configured, token_endpoint_auth_method is NOT none. It's client_secret_basic (which I am using)

 

        "oauthClient": {

            "autoKeyRotation": true,

            "client_id": "****************",

            "client_secret": "**************************",

            "token_endpoint_auth_method": "client_secret_basic"

 

And the code to exchange the token:

 

   response = requests.post(

       TOKEN_URL,

       headers={

           "Accept": "application/json",

           "Content-Type": "application/x-www-form-urlencoded; charset=utf-8",

           "authorization": "Basic {}".format(CLIENT_SECRET_BASIC)

       },

       data={

           "grant_type": "authorization_code",

           "redirect_uri": "http://localhost:9999/login",

           "code": code,

       },

   )

 

Is this a bug with Okta? What am I doing wrong?


kc6ba likes this.
  • kc6ba (kc6ba)

    I eventually figured it out, Okta's v3 JavaScript Sign-In Widget was initiating a PKSE flow even when explicitly told not to. I downgraded to the v2.60 Sign-In Widget and it worked.

    Selected as Best
  • kc6ba (kc6ba)

    I eventually figured it out, Okta's v3 JavaScript Sign-In Widget was initiating a PKSE flow even when explicitly told not to. I downgraded to the v2.60 Sign-In Widget and it worked.

    Selected as Best
This question is closed.
Loading
error: PKCE code verifier is required when the token endpoint authentication method is 'NONE'.