Closed ranjanM123 closed 5 years ago
The error says that exp
field inside JWT payload is more than 24 hours and that you must decrease it.
The expiration
value is defined here:
Probably you are passing an expiration
option to Webpush.payload_send
: can you check that? If you find that, simply remove that option or decrease the value.
Otherwise the problem is here:
Your server time is not correct (e.g. not UTC or not precise) and thus you get an error.
You can also decrease the vapid: expiration:
option to 12 hours for example, as a workaround for your imprecise server time.
Thanks for the response, @collimarco.
Thanks for the response, @collimarco.
From chrome browser Webpush::ResponseError (host: fcm.googleapis.com, #<Net::HTTPForbidden 403 Forbidden readbody=true> body: exp claim MUST NOT be more than 24 hours from the time of the request ):
From Firefox browser Webpush::ResponseError (host: updates.push.services.mozilla.com, #<Net::HTTPUnauthorized 401 Unauthorized readbody=true> body: {"code": 401, "errno": 109, "error": "Unauthorized", "more_info": "http://autopush.readthedocs.io/en/latest/http.html#error-codes", "message": "Request did not validate Invalid bearer token: Auth > 24 hours in the future"}):