web-push-libs / pywebpush

Python Webpush Data encryption library
Mozilla Public License 2.0
305 stars 52 forks source link

Default expiry of 24h may lead to errors #74

Closed drott closed 6 years ago

drott commented 6 years ago

In my experience, the default expiry of 24hours might be causing errors on the push backends of Google and Mozilla. They reject the request, with Mozilla reporting that the expiry is too far in the future, probably due to slight clock differences.

I would suggest to reduce the default expiry time in order to avoid such problems.

jrconlin commented 6 years ago

I'm guessing this is more a Vapid error than a pywebpush error.

Clock skew is always a problem, and the obvious work-around is to specify an exp yourself.

I'll consider reducing the default period to 12 hours, and file the bug on the py-vapid library.

drott commented 6 years ago

Thanks, yes, let's move it to: https://github.com/web-push-libs/vapid/issues/56