Closed alexlindsay closed 2 years ago
Hi @alexlindsay
That error tells me that you're getting a 400 back from your jwksUri
endpoint. Could you tell me what value you're providing for jwksUri
?
Was able to get the data I needed just fetching from the jwks uri and then using jwktopem package instead.
I am having this exact same issue. The uri
I'm passing in for my jwks is completely valid, following the express example.
Hi there - I have two JWT flows I'm validating with node-jwks-rsa. One goes through fine, while the other throws this error when the jwks client calls getSigningKey. When I inspect the JSONs at both the jwks uri locations they have the same format and properties. Both have KIDs that match what is located at the jwks uris with what is encoded in the tokens, the only difference I see between the two jwks json objects is one has a space between property name and semi-colon whereas the other doesn't. I'm wondering what would cause the client to throw the error here for 1 token versus the other?
Error tracing below shows it's a call with the jwksClient.getKeys() method.
Jwks client set up with:
const client = jwksClient({ jwksUri: <jwks_uri_value>, });
and throws the error when calling getSigningKey with a valid KeyID: `client.getSigningKey(keyId, function(err, key) {