-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Working fine on Chrome, FF, Opera, Edge etc tested on Win 10, Win 11 and Android - but not IoS Safari. Whatever I do, I get:
Push failed: 403 Forbidden
Response body:{"reason":"BadJwtToken"}
And this is reported by many people all over the place, so I am not the only one suffering with Apple the special snowflake.
Anybody has a clue what can be tried? The apple documentation says nothing much here: https://developer.apple.com/documentation/usernotifications/sending-web-push-notifications-in-web-apps-and-browsers
"The JSON web token (JWT) has one of following issues: The JWT is missing. The JWT is signed with the wrong private key. The JWT subject claim isn’t a URL or mailto:. The JWT audience claim isn’t the origin of the push service where you sent the request. The JWT expiration parameter is more than one day into the future."
I also changed the "sub" to "subject" in the vapid_claims (https://github.com/web-push-libs/pywebpush?tab=readme-ov-file#sending-data-using-webpush-one-call) since the Apple documentation mentions a "The JWT subject claim" in particular - but no luck.