Closed aKentorp closed 2 years ago
Hello @aKentorp, Thank you for opening an issue.
Could you please confirm that the JWT you are using has been exported from the Salesforce Core instance and pasted in the ./_jwt/sdc
folder of the b2c-crm-sync
folder?
Also, can you please confirm that you successfully extracted the JWT from this exported file by running the npm run crm-sync:sf:cert:publickey:get
command line?
This should create two files in the same folder, one .cert
and one .key
file with the name of the JWT, so dkmwdev.cert
and dkmwdev.key
.
Then try re-launching the npm run crm-sync:b2c:auth:jwt
command.
Thanks
Hi @jbachelet
We found the error, when running npm run crm-sync:sf:cert:publickey:get
we are expected to receive a SF_CERTDEVELOPERNAME
but if you have multiple self-signed Certificate, the outputted SF_CERTDEVELOPERNAME
might be wrong. In our case the returned SF_CERTDEVELOPERNAME
was certbottestialphadkr3
it should have been dkmwdev
.
You can consider this issue closed, thank your for the time and help.
When we run the command
npm run crm-sync:b2c:auth:jwt
, the response we get is{ "error_description": "JWT is not valid", "error": "invalid_client" }
We have succesfully created a self signed certificate and extracted the public and private key. We have added the public key to the B2C client ID. When retrieving an Auth Token through
npm run crm-sync:b2c:auth:clientcreds
, there are no problems.We have validated the generated token through https://jwt.io/, and it is valid when using the public and private key. This makes us believe there is some other problem with our request.
Our B2C API client is set up like this
Our Self Signed Certificate for JWT Minting
Can you please help us out?