jitsi / jitsi-meet-react-sdk

React SDK for Jitsi Meet
Apache License 2.0
66 stars 37 forks source link

JWT error: Kid claim is missing #33

Open GauravGusain98 opened 1 year ago

GauravGusain98 commented 1 year ago

Details I have an application with having Django backend and React Webapp frontend and a React native mobile app (react native). Earlier I was using an unofficial Jitsi package on Webapp to host video calls. The package I used was jutsu

Recently with the release of the official Jitsi React native SDK, I decided to upgrade my packages on web app and mobile app to the official Jitsi. So I added the React native SDK on mobile and React SDK on webapp.

I also have a self-hosted video server with auth_type set to JWT.

I followed the steps mentioned in the Jitsi SDK documentation and the mobile upgrade of Jitsi is working as expected but I am getting issues related to JWT.

  1. The first issue I got in the console was related to invalid nbf value which I tackled by adding of value to my JWT token. image
  2. After this was fixed I got another error in the console related to JWT error: kid claim missing. From the PyJWT documentation I got to know that it is a key ID that needs to pass as a header. Though I am unsure how it is generated but I tried to add a random key and passed it in the header while generating the token. Here is the payload that I am using to generate JWT image
  3. After I passed the kid value I got the below error. image
  4. I am able to start the video if I directly open my video server URL by adding the generated JWT token to my video server URL in this format - https://<my-video-server-url>/<room-id>?jwt=<jwt-token>. With this I can say that the token is valid token and there is some issue with the Jitsi package as with the unofficial package I was using earlier this issue is not coming.

Is anyone aware of this issue?

GauravGusain98 commented 11 months ago

I am still facing this issue, looking for some help