Closed cwoolum closed 4 years ago
Last time I ran the code, code flow w/ PKCE is working fine. So not sure. Check the server logs as to why it returns 401. Perhaps the lack of a client secret?
It turns out that not having the client secret was the problem. Our IDP doesn't support auth code flow without it.
I've been trying to dig through this issue all day and am not quite sure where the problem lies. I have an app that was working fine using implicit flow. I've changed the response type to
code
but now I get a 401 when trying to exchange the code for an id token. I've been trying to debug through the full sign in flow and from what I can tell, the state is removed from the store at line 116 during the callback and then it is unable to use that state to exchange the code for an id token.https://github.com/IdentityModel/oidc-client-js/blob/f62cfa72e36465776c0fdb13ae6253d238ad5eff/src/OidcClient.js#L116-L126
Here is a copy of my logs:
Since it can't find the existing state anymore, it seems to create a new one to send with the
authorization_code
request and thecode_verifier
then does not match. Is there something I'm missing here?My config is as follows: