Skip to content

Can't seem to get this working on Safari #175

@zehawki

Description

@zehawki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions