nyfer
November 16, 2021, 2:03pm
1
I would like to know the possibilities of receiving this error
Invalid code_challenge_method
i was checking the code and it looks like when it doesn’t find the hash code used , it throws the error
if (methods.indexOf(tokenParams.codeChallengeMethod) === -1) {
throw new AuthSdkError(‘Invalid code_challenge_method’);
}
But am not sure, can anyone confirm please
Cale
November 16, 2021, 2:51pm
2
Take a look here:
https://developer.okta.com/docs/guides/implement-grant-type/authcodepkce/main/#request-an-authorization-code
code_challenge_method should be S256
. Any chance you’re trying to hash with a different algorithm?
EDIT: fixed link
nyfer
November 16, 2021, 3:28pm
3
Don’t think so. Can the hash algorithm be customized?
Will that error only come when hash used is different?
Cale
November 16, 2021, 4:14pm
4
I’m not sure to be honest. Can you check your network tab and paste the query parameters of your /authorize call?
nyfer
November 16, 2021, 7:22pm
5
This was just one time error that i got, but after that i was not able to replicate.
So don’t really have query parameters. thank you
nyfer
November 18, 2021, 6:10am
6
Is it possible that earlier it was using different hash algorithm and now recently it changed to S256 or it was always S256?