1

my server timezone is London and we are in Indian standard Time, everything works fine, except when the jwt and refresh token both expires, I have a scenario where I have to generate a new refresh token with 1 hr validity and supply for the final execution to happen for my mobile app to sync all the data from mobile app to the server. I am getting this error

Error: Cannot handle token prior to 2022-11-25T22:41:29+0530" when i check it on postman it works fine but when it run from the mobile app it gives error

JWT Payload Data

{ "iss": "website address", "iat": 1669273766, "nbf": 1669273776, "exp": 1669273826, "aud": "myusers", "data": { "id": 1, "mobilenumber": "XXXXXXXXXXX", "email": "XXXXX@XXX.com", "deviceimeino": "XXXXXXXX", "deveventid": xxxx, "eventexpirydate": { "date": "2022-11-24 23:59:59.000000", "timezone_type": 3, "timezone": "Asia/Calcutta" } } }

Refresh Token Payload Data

{ "iss": "website address", "iat": 1669436131, "nbf": 1669436141, "exp": 1669439727, "aud": "myusers", "data": { "id": 1, "mobilenumber": "xxxxxx", "email": "xxxx@xxx.com", "deviceimeino": "xxxxxxx", "deveventid": xxx, "eventexpirydate": "2022-11-03 23:59:59" } }

jamesdlin
  • 81,374
  • 13
  • 159
  • 204

1 Answers1

0

What happened to me was really dumb and simple. I was running a server using Xampp. That server had a different time compared to the REAL local time. 2 hours ahead. The token will be never be valid that way

Nallib Tala
  • 51
  • 1
  • 5