Closed NikhilDeshmukh045 closed 4 years ago
Below are code snippet which I am using currently. const payload = { iss: clientId, sub: clientId, iat: issuedAtTimeSeconds, exp: expirationTimeSeconds, aud: url, jti: Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 12) }; const clientAssertion = await client.requestObject(payload);
Request Object and Client Assertion is not the same. Your IDP rightfully rejects your token call.
@panva I also got the same error when I am creating client assertion using a custom function(not using requestObject). I am passing Client Assertion created by custom function at clientAssertionPayload field of the Grant function of Client. Then also getting the same error. I want to ask is I am following correct approach or not?
Consult your IdP. As is i cannot help due to lack of details about what you're trying to do.
I am getting the above error for in a client.grant() function at https://github.com/panva/node-openid-client/tree/master/docs#clientgrantbody-extras , and it looks like error is related to clientAssertionPayload.