JWT token auth issue- "general warn Error verifying token err:not-allowed, reason:Not acceptable by exp"

Hi,

I’m trying to integrate the Jitsi with Rocketchat using JWT authentication.

Jitsi Alone working well when I pass the token manually with below playload

JWT actual/working payload:
“iss”: “XXXXX”,
“sub”: “XXXXXXX”,
“aud”: “RocketChat”,
“room”: “*”,

But rocketchat triggers the token with exp and fails “Authentication failed”
Also reported an error message in log file /var/log/prosody/prosody.log that “verifying token err:not-allowed, reason:Not acceptable by exp”

May 11 16:28:45 speakerstats.meeting.cwes.local:speakerstats_component warn Implement this lib to trigger external events.
May 11 17:48:38 mod_bosh info New BOSH session, assigned it sid ‘558ef55e-0ed1-4cd4-b572-ff7d0dc967af’
May 11 17:48:38 general warn Error verifying token err:not-allowed, reason:Not acceptable by exp
May 11 17:49:32 bosh558ef55e-0ed1-4cd4-b572-ff7d0dc967af info BOSH client disconnected: session close

“iss”: “XXXXX”,
“sub”: “XXXXXXX”,
“iat”: 1620735360,
“nbf”: 1620735360,
"exp": 1620738960,
“aud”: “RocketChat”,
“room”: “*”,

System time looks perfect. i belive exclude/validating the token expiry will resolve this issue. Not sure where to update.

Please help me to fix this.

Double-check the exp date, a common mistake is that sometimes it is passed as a string and not as a number.

Hi,
in which file need to check?

in token…

Emrah,

Just validated, its not sending as string.

Are the time zone and the system time the same on both servers?

Yes, its working after changing both of the servers timezone to same one. Thank you.