JWT token being refreshed too often

Open
#147 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

No files, tests, or entry points are named. Start with the linked Apple documentation and inspect how pywebpush currently creates JWTs; the scope and reuse behavior for Apple and other push endpoints must be agreed before implementation, with completion defined by a documented refresh policy.

Written by the indexing model from the issue text.

Description

Apple has recently announced they will support web push for Safari on OSX this year, and also iOS and iPadOS the next year, so I'm checking my implementation if everything looks ok. I stumbled upon one sentence in the official documentation found here which states:
Don’t refresh your JWT more frequently than once per hour.

I'm not sure yet if it will be a problem, not storing and reusing it for at least an hour as I don't have a beta version of OSX installed on my computer, but maybe this is something the library could do just in case? I suppose it would also be nice for other push endpoints, not just Apple.

I was also thinking how I would implement this on my side, but it seems to be quite complicated and maybe pywebpush is the right place for such a functionality?

Dominant language
Python
Stars
381
Forks
61
Avg merge
6m
Merged PRs (30d)
1

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-push-libs/pywebpush

All issues in web-push-libs/pywebpush

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.