Error verifying the jwt

Once we generate the jwt with certificate, we are getting error message as “error verifying the jwt”.

@abhijitna This error should usually appear when the client secret mentioned in the index.html file of webSDK is incorrect. Please recheck the client secret for the application you created on bots platform and associated with the webSDK channel at your Bot .Do let us know if you are still facing issues.

@Subrahmanyam Thanks for the response Subrahmanyam, actually we are not going by client secret, instead we are using RS256 algorithm where the token generated by signing with private and public key. The public key is configured at the bot end.
Signing is not done with client secret. We are trying to generate jwt with certificate.

ok @abhijitna , I have verified this again from my end. Could you please check the format for public key added to the app ?

This should be added as below:

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdlatRjRjogo3WojgGHFHYLugd
UWAY9iR3fy4arWNA1KoS8kVw33cJibXr8bvwUAUparCwlvdbH6dvEOfou0/gCFQs
HUfQrSDv+MuSUMAe8jzKE4qW+jK+xQU9a03GUnKHkkle+Q0pX/g6jXZ7r1/xAK5D
o2kQ+X5xK9cipRgEKwIDAQAB
-----END PUBLIC KEY-----

I have used the jwt generated using the public and private keys on jwt.io and the bot responds fine. Please refer to the screenshots for reference:

image

Snip of the app created on bot builder using RS256 which uses the public key.

image

Snip showing that jwt generated on jwt.io is being passed to the jwtgrant endpoint

image

Snip of the bot running on webSDK which uses the app built on RS256 algorithm

image

@Subrahmanyam, It’s working now. Thanks a lot Subrahmanyam.