Make VAPID subject configurable via MESHCORE_VAPID_SUBJECT (fixes iOS/Safari push)#289
Merged
jkingsman merged 1 commit intoJun 16, 2026
Conversation
iOS/Safari (Apple APNs) rejects the hard-coded mailto:noreply@meshcore.local VAPID subject with 403 BadJwtToken because .local is a reserved TLD; FCM accepts it, so only Apple devices were affected. Add MESHCORE_VAPID_SUBJECT (default unchanged) resolved via a new get_vapid_claims() in app/push/vapid.py, used by both dispatch and the test-notification endpoint. Closes jkingsman#288
395b501 to
1243d01
Compare
Owner
|
Fascinating issue; thanks for the fix! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
iOS/Safari Web Push silently fails: the hard-coded VAPID
submailto:noreply@meshcore.localis rejected by Apple's APNs with403 BadJwtToken(.localis a reserved TLD). FCM accepts it, so only Apple devices are affected.Verified against a live iOS subscription:
Change
MESHCORE_VAPID_SUBJECT(app/config.py); default unchanged (mailto:noreply@meshcore.local) — purely additive, no behavior change unless set.get_vapid_claims()(app/push/vapid.py), used by both dispatch (manager.py) and the test endpoint (routers/push.py).Testing
./scripts/quality/all_quality.shpasses (backend 1541 + frontend 783 tests, lint, typecheck, build).Notes / follow-ups
mailto:noreply@example.comormailto:noreply@meshcore.io) if you'd prefer iOS to work out of the box — see iOS/Safari Web Push fails: APNs rejects hard-coded VAPID sub (.local) #288 for that discussion.Closes #288